Date format MM/dd/yyyy hh:mm AM/PM

  • in SSRS, there is a standard format for date

    "1/5/2008 2:19 PM"

    But i want to implement the following format

    "01/05/2008 02:19 PM"

    Thanks!:hehe:

  • Not tested

    Property Format = "MM/dd/yyyy hh:mm"

    Christophe

  • this doesnt work fully...

    the output is only "01/05/2008 02:19"

    AM or PM is not displayed which is also required!

  • Hello,

    Use This Format Expression

    MM/dd/yyyy hh:mm tt

    Hope this helps

  • You can also try to change the "Language" property of the report itself, when using the "Format" property of a textbox set to format-code "g".

    Setting the Report-Language to "English (United States)" will give AM/PM format for time. Setting it to "English (United Kingdom)" will give the 24h-format.

    Grtz.

  • Thanks Shilpa! 😀

    the date format "MM/dd/yyyy hh:mm tt" worked.

  • I have seen a lot of posts on how to format dates, and it still astounds me that in an age of global software and multinational corporations, we are still using ambiguous date formats.

    Whether or not software is for internal company use or client use, all dates displayed should never, and I repeat never be ambiguous. This is especially true if it is for a thrid party client.

    Either the international date format ("YYYY/MM/DD") or a short named month format ("MMM/DD/YYYY" or "DD/MMM/YYYY") should be used (with or without separators).

    The international date format is also the only date format that can naturally be sorted.

    -- John Oliver
    Sometimes banging your head against a wall is the only solution.

  • Hi John,

    i have specified this date format only to display it in this format for certain cells in SSRS report....

    Whats the harm in doing so... ?

    Should i specify one of the defined formats available?

    Please help.

    Thanks!:D

    Shri

  • Nayak,

    I understand where you are coming from and it does always depend on your audience.

    If there is a chance that the report can be viewed by an international audience, then using any country's standard date format is going to cause confusion.

    I would read the date "06/11/2008" as "6th November 2008", whereas an American reader would read this as "11 June 2008".

    Whereas the date "2008/11/06" would be understood by any international reader (granted, it will take a few by suprise).

    The date "06 Nov 2008" cannot be mis-understood and is my preferred format, although "Nov 06 2008" is also valid.

    As good practice, all developers, designers and Business Analysts should be pushing for a unambiguous date format.

    I have managed to talk management in a number of teams around with just such example of this, and it has saved face when those applications / reports were then executed by upper management in other countries (both US and Aus).

    Hope this helps clear my earlier post.

    -- John Oliver
    Sometimes banging your head against a wall is the only solution.

Viewing 9 posts - 1 through 8 (of 8 total)

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