google

Select Date in SQL in Desired Formats like AM, PM

| Friday, May 6, 2016
Use following in-built function to select the dates in desired formats. Following format returns date in AM, PM format

Query - SELECT FORMAT(GetDate(),'MM/dd/yyyy hh:mm:ss tt')
Result - 05/06/2016 03:06:02 PM

0 comments:

Post a Comment

Prev
▲Top▲