Need current time in hh:mm[AM/PM] format

  • Hi ,

    I am a newbie to SQL server . I need current time in hh:mm[AM/PM] (say 7:50PM ) format using getdate function.

    I tried substring(convert(varchar,getdate()),13,7) but i need more simpler function than this. 🙂

  • select right(convert(varchar,getdate(),0),7) as Format_Time

    Regards
    Shrikant Kulkarni

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

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