How to display date in format of dd-MON-yyyy?

  • I have textbox for Date which displays Subscription_date field of dataset1 in format dd-mm-yyyy. Now i want this format to be done in dd-MON-yyy where MON is like JAN, FEB etc. And expression for date fields right now is

    =First(Fields!SUBSCRIPTION_DATE.Value, "DataSet1")

    However, specifying this as

    =Format(Fields!SUBSCRIPTION_DATE.Value, "dd-MON-yyyy") throws an error like expreesion can refer to field within current dataset aggregate.

    So how to write an expression with date format and dataset as well.

  • Please check this...

    SELECT CONVERT(VARCHAR(11), subscription_date, 106) AS [DD MON YYYY]

    Thanks

  • Use the dd-MMM-yyyy format string instead.

    Check this link out for other format strings

    http://msdn.microsoft.com/en-us/library/8kb3ddd4%28VS.71%29.aspx

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply