Formatting Dates

  • Hi,

    I can't work out how to get dates to display in the following format dd/mm/yyyy.

    They currently display mm/dd/yyyy.

    Can someone explain how I can change this please?

  • Look for CAST and CONVERT in books online

  • Try this.

    SET LANGUAGE BRITISH



    Nuke the site from orbit, its the only way to be sure... :w00t:

  • I should have made you aware that my dates appear as required in my results set but the formatting is changed when rendered on the report.

  • If you prefer not to do a cast or convert on the SQL query, you could just change the display properties of the field. In the design view of the BI Studio just select the field and look in the poperties window for the format property and set it to dd/MM/yyyy

    If you're editing the rdl code manually you could try replacing the language tag:

    <language> en-US </language>

    with:

    <language> en-GB </language>

    to get UK style dates through out the report.

  • ... and after all that make sure the user's browser is set to display UK dates (Tools/Options) !

  • If the report display is the only problem you're having, you could try formatting the date in the report.

    Go to the text box where the date is being displayed, can use the FORMAT function to chose the display you want in the Expression area of the textbox.

    For example, try something like: =FORMAT(yourdatefield.value, "dd/MM/yyyy") and hopefully that will give you back what you're looking for.

    Good luck.

  • In your report, whether a header, text box etc do the following

    FORMAT(Fields!Created.Value, "dd/MM/yyyy")

    NOTE that month must be UPPER CASE.

    If you want eg 3 Jan 2007 use " dd MMM yyyy"

  • HI,

    U can try in this way:)

    select convert(varchar, getdate(), 3) ---19/11/07

    select convert(varchar, getdate(), 103)---19/11/2007

    thnxm

    Arjuna

    Orange Business Services(India)

    Thnx/Regds,
    Mangu
    Orange Business Services(India):cool:

  • Thanks. I used the FORMAT function in the end and this worked great.

    Thanks again to everyone

  • The correct way to format a date is:

    i. Ensure your report language is correct, when a new report is created the language is set to English(United States) change it to English(United Kingdom) (or your preferred language) in the report properties. Reporting Services takes no notice of the language settings on your PC.

    ii. In the text box in which you are displaying the date set the format by right clicking and selecting 'Properties', in the format section select 'Date' and the whatever format you require.

    HTH

  • Using Format function That can be display what ever format you want

    That is

    Format(!Fields.Urcolumn.Value,"dd/MM/yyyy")

    and also Using Properties of that particular dataregion

    Properties>>Format>>....>>and select Date>>and choose wt format u want in that listed

Viewing 12 posts - 1 through 11 (of 11 total)

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