Chandan Kumar
Chandan Kumar

Reputation: 4638

how to display date format as MM/DD/YYYY HH:MM:SS Z in ssrs

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

Answers (3)

Sir Swears-a-lot
Sir Swears-a-lot

Reputation: 432

This works for me:

=Format(Fields!FeildName.Value, "MM/dd/yyyy hh:mm:ss tt")

Upvotes: 1

Chandan Kumar
Chandan Kumar

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

kgu87
kgu87

Reputation: 2057

=System.TimeZone.CurrentTimeZone.ToUniversalTime(First(Fields!NOW.Value, "DataSet1"))

enter image description here

Upvotes: 1

Related Questions