Custom Search
Logiclabz

Get AM/PM in Sql Server DateTime Format

  

Sql Server natively does not provide any convert format to get AM/PM part from DateTime datatype.

The following T-SQL snippet gets the AM/PM from a DateTime format in Sql Server.

print Right(CONVERT(VARCHAR,getdate(),9),2)



  


Leave a reply




Do you like this post?