日期和時間類型Date and time types

適用於: 是SQL Server 否Azure SQL Database 否Azure Synapse Analytics (SQL DW) 否平行處理資料倉儲 APPLIES TO: yesSQL Server noAzure SQL Database noAzure Synapse Analytics (SQL DW) noParallel Data Warehouse

SQL ServerSQL Server 支援下列日期與時間類型。supports the following date and time types.

本節內容In this section

日期 (Transact-SQL)date (Transact-SQL)
datetime (Transact-SQL)datetime (Transact-SQL)
datetime2 (Transact-SQL)datetime2 (Transact-SQL)
datetimeoffset (Transact-SQL)datetimeoffset (Transact-SQL)
smalldatetime (Transact-SQL)smalldatetime (Transact-SQL)
time (Transact-SQL)time (Transact-SQL)

另請參閱See also

日期和時間資料類型與函數 (Transact-SQL)Date and Time Data Types and Functions (Transact-SQL)
AT TIME ZONE (Transact-SQL)AT TIME ZONE (Transact-SQL)