Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

sql get month and year from date

DECLARE @date date = '04-18-2020' --date for act;
SELECT YEAR(date), MONTH(date)    --, DAY(date) add if u want day
Source by www.sqltutorial.org #
 
PREVIOUS NEXT
Tagged: #sql #month #year #date
ADD COMMENT
Topic
Name
2+4 =