To get today date without time as string variable use following script:
Select CONVERT( CHAR(8), GetDate(), 112)
To get datetime variable of today date without time use following script:
Select CAST( CONVERT( CHAR(8), GetDate(), 112) AS DATETIME)
Select CONVERT( CHAR(8), GetDate(), 112)
To get datetime variable of today date without time use following script:
Select CAST( CONVERT( CHAR(8), GetDate(), 112) AS DATETIME)
Comments