I am using reporting services to make a matrix. The row value is the date portion of DateIn. The value is a count of transactions. The column type is the problem. It is the hour part of the timein value.
I got it from the database like this:
{fn HOUR(dbo.[Transaction].[TimeIn])} AS Hour
This works, but gives 24 hour time (and only the hour part, so it looks like 10, 11, 12, 13, 14, etc.)
I want it to look like 10:00 AM, 11:00 AM, 12:00 PM, 1:00, PM, etc.
I have read several books, checked online books, tried format functions... and I'm going nuts. This should be so simple- how do I format this so a human can read it? Thanks
If you need the database to do the conversion, then you can set the format code of the textbox to "t" and use the following expression.=CDate(Fields!Hour.Value & ":00")
If you can use the raw date value from the database, then you can just set the format code of the textbox to "t". If you are grouping on only the hour, then you can still just get the raw date value from the database and use =Fields!TimeIn.Value.Hour as the group expression.
No comments:
Post a Comment