Datepart and Preceding Zeros??

  • Hello all,

    I need to format a data string in the following format

    YYYY-MM-DD

    Normally i would use datepart for this but it leaves off the preceding zero, so what i get is something like this

    2004-6-6 when what i really need is this 2004-06-06

     

    Does anyone know of an easy way to do this?

     

    thanks all for the advice

  • Ahh never mind, i got it

  • Hey Chris how you doing long time no chat 🙂

    Just a note that if you found the solution could you post it please in case someone else has the same issue 🙂

    chat soon pm me

    ----------------------------------------------
    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

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

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