获取今天的00:00:00
SELECT
CONVERT
(DATETIME,
CONVERT
(
VARCHAR
(10),GETDATE(),120))
获取今天的23:59:59
1、SELECT
DATEADD(SS,-1,DATEADD(DD,1,
CONVERT
(DATETIME,
CONVERT
(
VARCHAR
(10),GETDATE(),120))))
2、SELECT CONVERT(DATETIME,CONVERT(VARCHAR,GETDATE(),112),112)+1-1.0/3600/24