sql server 2005
Hi,
This is Sahu i have a one doubt how to give the date foemat syntax in ssrs reports
Thank you
July 13th, 2011 3:38pm
"2010-18-05" :
Format(CDate(dateEx), "dd/MM/yyyy")Best Regards, Uri Dimant SQL Server MVP http://dimantdatabasesolutions.blogspot.com/ http://sqlblog.com/blogs/uri_dimant/
Free Windows Admin Tool Kit Click here and download it now
July 13th, 2011 3:43pm
give me one example
July 13th, 2011 3:58pm
Hi,
You can format dates using various built in functions in ssrs. Below are some examples.
Format(Fields!myDate.Value, “M/d/yy”) - 2/11/08
Format(Fields!myDate.Value, “MM/dd/yyyy”) - 02/11/2008
Format(Fields!myDate.Value, “d-MMMM-yy”) - 11-December-08
Format(Fields!myDate.Value, “d-MMM-yyyy”) - 11-Dec-2008
Format(Fields!myDate.Value, “M/d/yyyy H:mm”) - 2/11/2008 13:50
Format(Fields!myDate.Value, “MMM-dd-yyyy”) - Feb-11-2008
Click the below link and see the Date functions section for more details.
http://msdn.microsoft.com/en-us/library/ms157328.aspxMSBI Developer
Free Windows Admin Tool Kit Click here and download it now
July 13th, 2011 4:11pm
Hi AswaniSahu,
Thanks for your question and other partners’ replies.
TDPN’s suggestion contains most types that using Format function to
format a date in different forms, I will complement it with below link:
http://praveenbattula.blogspot.com/2010/01/date-formatting-in-sql-server-reporting.html.
Actually, there are serious functions relate to the date type, you can easily find them and their correspond examples in the expression
dialog box, for example,
1. Right-click the textbox in one report table, select Expression, open the Expression dialog box.
2. In the Category list, expand Common Functions, select Date & Time. In the Item list, click CDate, the Description and Example
of CDate being displayed on the right side.
Hope it helps you. If there is anything unclear, please feel free to let me know.
Thanks,
Sharp Wang
Please remember to mark the replies as answers if they help you and unmark them if they provide no help.
July 14th, 2011 8:56pm