get today's date in sql server in format code example Example: sql DATE = GETDATE() CAST(GETDATE() AS DATE)