sql get datetime from db code example Example 1: sql DATE = GETDATE() CAST(GETDATE() AS DATE) Example 2: sql display today's date SELECT getdate()