rajesh466
SSC Veteran
Points: 221
More actions
June 11, 2008 at 12:57 am
#186672
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. 🙂
substring(convert(varchar,getdate()),13,7)
shrikant-279400
SSCommitted
Points: 1651
June 11, 2008 at 1:06 am
#827085
select right(convert(varchar,getdate(),0),7) as Format_Time
RegardsShrikant Kulkarni
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply