Change a Date/time to a date format

  • I need to change a Date/Time field to Date filed in Report Designer.

     

    Help please

  • Hi there,

     

    What format do you want?

     

    thanks

    Chris

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • hi

     

    jUST DATE- don't want the time on the end

  • There a re few ways to do this.

    SELECT

    CONVERT(VARCHAR(13),GETDATE(),11)

     

    I'm just not sure what date format you want.

     

    Thanks

    Chris

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • In the properties window - locate Format and enter MM/dd/yyyy.

    Or if an expression, you can use the function FormatDateTime(Fields!<your datetime field>,2)

    (This uses the machine configuration of date for short date.

     

    Hope this helps

  • Patrick Nagle (9/14/2007)


    In the properties window - locate Format and enter MM/dd/yyyy.

    Or if an expression, you can use the function FormatDateTime(Fields!<your datetime field>,2)

    (This uses the machine configuration of date for short date.

    Hope this helps

    hello,

    m using this one ..

    but how do i display it in mm/dd/yyyy format? it currently displays 9/1/2007 instead of 09/01/2007

    thnx in advance .

  • wer do u wanna display it?

    if it is a datetime parameter and u r selecting the date from a datepicker control, then it will always be displayed in the locale date settings(check out ur language settings of ur browser).

    but if u just wanna display a date in a particular format in a report, it can be done...

Viewing 7 posts - 1 through 6 (of 6 total)

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