2011年9月20日 星期二

cast 日期時間的比較

參考:datetime (Transact-SQL)

--
select CAST ('2011/3/3 11:11:11' as time)
select CAST ('2011/3/3 11:11:11' as date)
select CAST ('2011/3/3 11:11:11' as smalldatetime)
select CAST ('2011/3/3 11:11:11' as datetime)
select CAST ('2011/3/3 11:11:11' as datetime2)
select CAST ('2011/3/3 11:11:11' as datetimeoffset)

沒有留言:

張貼留言