I have a date/time field that contains the date in yyyy-mm-dd hh:mm:ss format. I'm trying to just strip off the year and month and combine into a new field.
example:
DATEPART(MONTH,dbo.SERVICE.YMDEFF)+ DATEPART(YEAR,dbo.SERVICE.YMDEFF) AS NEWEFF
but this is summing the month and year
month is 07 and year is 2002 the result is 2009
I need 200207
All help is greatly appreciated!!
example:
DATEPART(MONTH,dbo.SERVICE.YMDEFF)+ DATEPART(YEAR,dbo.SERVICE.YMDEFF) AS NEWEFF
but this is summing the month and year
month is 07 and year is 2002 the result is 2009
I need 200207
All help is greatly appreciated!!