YEAR Query

Richard G

Registered User.
Local time
Today, 16:45
Joined
Jul 16, 2006
Messages
22
Please could someone advise me how to set the YEAR in a query - all my data for 2006 is fine but I have uploaded some data for today (01 Jan 07) and ALL by queries / reports now show to 31/12/2006 then at the top, instead of the bottom, reads 01/01/06 ?

Regards

Richard
 
How are you adding the dates in the first place?
To get the wrong data from a query you must be getting the wrong data at source or you are doing some sort of calculation that is faulty.

Peter
 
Year Query

I'm using the Date Serial function:

Date: DateSerial(6,1,[Field Name]!Field2)

Works fine for 2006 but how can I tell it once the date reaches 31/12/06 the next date should read 01/01/07 - if I change the '6' for a '7' all my 2006 dates change to 2007 !

Regards

Richard
 
just pick out the current year using the Year() function
Date: DateSerial(year(date()),1,[Field Name]!Field2)

this will obviously only add the current year, why not just store the date as part of your data?

Peter
 

Users who are viewing this thread

Back
Top Bottom