Showing posts with label svcmonththis. Show all posts
Showing posts with label svcmonththis. Show all posts

Thursday, March 8, 2012

access to sql query issue

this string is from an access db
DateAdd("d",-(Format([date_effective],"d")-1),[date_effective]) AS SvcMonth
this is the error i get in sql:
'Format' is not a recognized function name.
what do i need to change?If you are doing a pass-thru SQL statement then the target database does not support FORMAT.

Originally posted by michelin man
this string is from an access db
DateAdd("d",-(Format([date_effective],"d")-1),[date_effective]) AS SvcMonth

this is the error i get in sql:
'Format' is not a recognized function name.

what do i need to change?|||i got it to work....

DATEADD(d, - (DATEPART(d, DATE_EFFECTIVE) - 1), DATE_EFFECTIVE) AS SvcMonth