February 9, 2018 at 10:29 am
I am working on an SSRS report and the query I am using returns a date time value of '2018-01-01 11:07:12.000'. I need to display only the hours and minutes and the format using this example would be 1107. I tried using datepart(sql) and concatenating the two values but datepart returns an integer value and drops the leading 0 in the minutes. Thank You!
February 9, 2018 at 11:20 am
wwright 50911 - Friday, February 9, 2018 10:29 AMI am working on an SSRS report and the query I am using returns a date time value of '2018-01-01 11:07:12.000'. I need to display only the hours and minutes and the format using this example would be 1107. I tried using datepart(sql) and concatenating the two values but datepart returns an integer value and drops the leading 0 in the minutes. Thank You!
Have you tried the FORMAT function? To be clear, the one on SSRS not on T-SQL.
February 9, 2018 at 11:30 am
Yes I have. I am going to close this post. I get the dum ass of the day award. After I made the post I got to looking at the table and discovered what I was looking for already had a column for time in the format I needed.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply