SSRS – Quick Date Formatting for Tables, Textboxes and Charts

Datasets containing datetime fields can be excellent for ordering but you will want to apply some quick formatting techniques to tidy up those date formats when used in tables, text boxes, or even labels in charts.  Outlined below are some basic suggestions for quickly tidying up 3 different scenarios in your report.

For a datetime field used in a Tablix, go to the Format property and enter … 

dd/MMM/yyyy

For chart labels you will need to enter an expression in the Label property …

=Format(Fields!YourDateTimeField.Value,"dd/MMM/yyyy")

For textboxes for example, displaying the datetime of the report execution, you can enter the following in the Format property of the textbox …

dd/MMM/yyyy hh:mm tt

For Dates coming from OLAP cubes, you may find the above expressions fail to work.   If that is the case, try using CDate in your tablix cell first using the following field expression…

=CDATE(Fields!YourOLAPDateField.Value)

Then in the Format property for the textbox, enter your date format e.g. …

dd/MMM/yyyy

About AussieBICG

Connect with me here https://au.linkedin.com/in/aussiebicg

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s