sql datetime code example
Example 1: sql datetime as date
SELECT
CONVERT(DATE, GETDATE()) date;
Example 2: sql datetime now
SELECT GETDATE();
Example 3: sql server date field syntax
DATE - format YYYY-MM-DD
SELECT
CONVERT(DATE, GETDATE()) date;
SELECT GETDATE();
DATE - format YYYY-MM-DD