A simple datetime conversion

  • How can i convert 'Friday, August 15, 2008, 7:30 pm' to '08/15/2008'??

    i need the sql query....i have searched all the datetime functions and convert options but i could not find one...

    any idea?

    Thanks,

    Usman

  • If you drop the 'Friday' and the commas, then

    SELECT CONVERT(varchar(10), CONVERT(datetime, 'August 15 2008 7:30 pm', 100), 101)

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

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