Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

sql date with month and year only

SELECT
   DATEADD(MONTH, DATEDIFF(MONTH, 0, <dateField>), 0) AS [year_month_date_field]
FROM
   <your_table>
 
PREVIOUS NEXT
Tagged: #sql #date #month #year
ADD COMMENT
Topic
Name
9+3 =