2009年11月5日 星期四

sql server 取date 及 time

select convert(varchar(10) , getdate(),112 ) as myDate, convert(varchar(8),getdate(),8) as myHour
回傳:20091105 17:44:57

select convert(varchar(10) , getdate(),121 ) as myDate, convert(varchar(8),getdate(),8) as myHour

回傳:2009-11-05 17:44:57


沒有留言:

張貼留言

離線安裝SSMS 22 launched extracted application exiting with result code 0x138b

SSMS 22 安裝器下載頁面 https://learn.microsoft.com/zh-tw/ssms/install/install https://aka.ms/ssms/22/release/vs_SSMS.exe 將安裝檔下載到本機,檔案好大2.5G  https:...