Friday, 28 September 2018

Format Date Time On SSRS Report

On SSRS server, format standart for DateTime was adapted from Computer Setting. If we want to change this format, we must use an expression Format(Date, "StringFormat") like picture below


2) The Format command and specify the exact format you require.
For example…
CommandResult
Format(Parameters!Date.Value,”dd-MM-yyyy”)10-04-2007
Format(Parameters!Date.Value,”dd/MM/yyyy”)10/04/2007
Format(Parameters!Date.Value,”MMM-dd-yyyy”)Apr-10-2007
Format(Parameters!Date.Value,”MMM-dd-yy”)Apr-10-07
So 3 M’s give you “Apr” ….anyway this is quite useful if you’re looking for Day/Month/Year , since the system will default to MM/DD/YYYY.

Reference : https://thavash.wordpress.com/2007/04/10/working-with-dates-in-reporting-services/

No comments:

Post a Comment