get current system datetime in sql server code example Example: sql DATE = GETDATE() CAST(GETDATE() AS DATE)