SQL Server
How to get Date only from the datetime value?
SELECT CONVERT(VARCHAR(10), getdate(), 101); Outputs in mm/dd/yyyy SELECT CAST(getdate() AS date); To get the current date time: SELECT getdate(); SELECT CURRENT_TIMESTAMP; Other related functions: ELECT CONVERT (time, SYSDATETIME()) ,CONVERT (time, SYSDATETIMEOFFSET()) ,CONVERT (time, SYSUTCDATETIME()) ,CONVERT Read more…