Reputation: 4638
Can you please suggest me how to display date format for a date column as MM/DD/YYYY HH:MM:SS Z
format in ssrs ?
I have googled but i am not getting exact format.
Upvotes: 0
Views: 10345
Reputation: 432
This works for me:
=Format(Fields!FeildName.Value, "MM/dd/yyyy hh:mm:ss tt")
Upvotes: 1
Reputation: 4638
I was wondering how to do this(how to display date in UTC format ('MM/dd/yyyy HH:mm:ss Z')
. But in Sql Server 2012 it's too easy. Can be done like this.
In Sql query we can do like below
SELECT EmpName, FORMAT(ApprovedDate, 'MM/dd/yyyy HH:mm:ss Z') as ApprovedDate From Employee
Or in SSRS report expression we can do like below
Format(Fields!ApprovedDate.Value, "MM/dd/yyyy hh:mm:dd" & " Z")
EmpName and ApprovedDate are the columns of Employee Table.
Hope this might be helpful for others
Upvotes: 2
Reputation: 2057
=System.TimeZone.CurrentTimeZone.ToUniversalTime(First(Fields!NOW.Value, "DataSet1"))
Upvotes: 1