DateTime in SSRS
Asked Answered
L

1

1

I would like to get datetime(ex: 2013-09-20 21:32:49.000) from SQL and display only date(ex: 2013-09-20) in SSRS.

Could anyone let me know the syntax for doing this. I tried below syntax but no luck

=First(Fields!Start_date.Value, "Database_Name")
Lenitalenitive answered 30/10, 2013 at 19:55 Comment(0)
I
7

Method 1: You can format date in textbox properties. Right click on textbox and go to textbox properties.

enter image description here

Method 2: Set the expression something like

=FormatDateTime(Fields!Start_date.Value, DateFormat.ShortDate)

Interscholastic answered 30/10, 2013 at 20:50 Comment(2)
How do I add the database name for the above mentioned syntax?Lenitalenitive
In method 1 you will keep your expression as it is. In second method the expression would be FormatDateTime(First(Fields!Start_date.Value, "Database_Name"), DateFormat.ShortDate)Interscholastic

© 2022 - 2024 — McMap. All rights reserved.