Criteria in Query

L

Lamar

I am trying to convert a 97 Database to 2003. One of the queries has the
following below criteria. So the DateAdd function is calculated a date 365
days back before today's date. The Format function is formatting as Year
Quarter (i.e. 20084 - year 2008 4th quarter) I need this date in this
format. The Format function is the error.

Does the Format function in 2003 no longer format dates as year quarter? It
is still listed as User-defined date. Any help is greatly apprecaited.
Thanks. Lamar
 
J

Jerry Whittle

I just ran the following in the VBA Immediate window in 2003 and it worked
fine.

Debug.Print Format(DateAdd("d",-365,Now()),"yyyyq")

Precisely what error are you getting? Is it an error message or just not
returning the expected data?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top