none
SSRS DateFormat

    Question

  • Hi,

     

    I am having the ReportDate='1998-12-31 00:00:00.000'

     

    I need in the format 'mm/dd/yy hh:mm AM/PM'

     

    can you please tell me the Expression for this format.

     

    Thanks

    Dinesh

    Friday, July 27, 2007 7:35 AM

Answers

  • hii

    The format for the date field as "mm/dd/yy hh:mm AM/PM" is as follows

    =Format(Parameters!To_Timeframe.Value,"MM/dd/yyyy" & " " & "h:mmTongue Tieds tt")

    (the parameter!to_timeframe.Value can be the value of any date field,i just gave it for example)

    This will work fine.

    Thanks

    Mahasweta

     

     

     

     

     

     

     

     

     

     

     

    Friday, July 27, 2007 10:50 AM
    Moderator

All replies

  • It is best practice to use one of the format codes.

    Right click - properties on the cell, select format, click "...", and you can see the date formats from there. This will be converted into a date code when you OK the dialog.

    If you use this in conjunction with having the property Report Language set to User!Language, then your users will see the date in the format that suits them
    e.g. 31/12/2001 vs 12/31/2001 vs 31.12.2001


    • Proposed as answer by Be1WithCode Thursday, June 17, 2010 6:24 PM
    Friday, July 27, 2007 10:06 AM
  • hii

    The format for the date field as "mm/dd/yy hh:mm AM/PM" is as follows

    =Format(Parameters!To_Timeframe.Value,"MM/dd/yyyy" & " " & "h:mmTongue Tieds tt")

    (the parameter!to_timeframe.Value can be the value of any date field,i just gave it for example)

    This will work fine.

    Thanks

    Mahasweta

     

     

     

     

     

     

     

     

     

     

     

    Friday, July 27, 2007 10:50 AM
    Moderator
  • Hi,

     

    You can use the Format function for this. http://msdn2.microsoft.com/en-us/library/8kb3ddd4(VS.71).aspx have a look at this link.

    It gives you details of all the formating options.

     

     

    Thanks

    Virendra

     

    Friday, July 27, 2007 11:23 AM
  • Hi,

     

        I tried the below format

    Format(Fields!Survey_Mailed_Date.Value,"MM/dd/yy" & " " & "h:mms tt")

     

    but in report it is displaying as "MM/dd/yy h:mms tt"

     

    When i used this in the header section like below it returns the correct result

    Format(Now,"MM/dd/yy" & " " & "h:mms tt")

     

     

    Thanks

    Dinesh

     

    • Proposed as answer by Emerogork2 Tuesday, November 13, 2012 6:11 PM
    Saturday, July 28, 2007 10:55 AM
  • Hi,

     

       My problem is solved.

     

       SSS is a datetime. before i was not converted into datetime after converting it is working

     

       Here the below syntax is used to display date like "03/12/07 09:27 AM"

     

    =Format(Cdate(Fields!SSS.Value),"MM/dd/yy " & " " & "hh:mm tt")

     

     

    Thanks

    Dinesh

     

    Saturday, August 04, 2007 9:12 AM
  • Monday, April 05, 2010 7:39 PM