Trouble converting varchar to datetime

  • Hi,

    I have tried searching the forums for help but none of the solutions i come up with seem to work.  I have a varchar @latestUpdate with the value:

    19/09/2007 23:59:59

    Is there a simple way of converting this to datetime??

    Cheers,

    Sam

     

  • Hi Sam,

     

    Try this...

    SELECT

    CONVERT(DATETIME,@latestUpdate,103)

     

    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,

    Worked a charm!

    Cheers

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

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