sql server function to return current time and date code example Example: sql datetime now SELECT GETDATE();