Convert date to a format of dd/mm/yyyy HH:mm:ss

  • Hi,

    I have the following sql

    Select '2013-09-17 21:01:00.000'

    I want this the date to show as:

    17/09/2013 21:01:00

    I have tried the following sql but does not change to do the format I require

    Select CONVERT(varchar,'2013-09-17 21:01:00.000',103)

    Thanks

  • I'm being thick, sorted it now:

    Select

    convert(varchar,convert(datetime,'2013-09-17 21:01:00.000'),103)+' '+convert(varchar,convert(datetime,'2013-09-17 21:01:00.000'),108)

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

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