需要类似的输出
11/23/15 05:14:05 PM
Try this..
SELECT CONVERT(VARCHAR(20), SYSDATETIME(), 22)
there are many available formats on the net.. try some googling.
below are sample link:
http://www.sql-server-helper.com/sql-server-2008/sql-server-2008-date-format.aspx
Or you can try this:
SELECT FORMAT(GETDATE(), 'MM/dd/yy hh:mm:ss tt', 'en-US')
You can customize the date time format as you like.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.