Date query

D

Dudley

Is it possible to create a query field which will yield the last day of the
month in the year following a specified date? For example if the date is
(British style) 25/10/2009, I would like 31 October 2010.

Thanks for any help.
Dudley
 
R

Rick Brandt

Is it possible to create a query field which will yield the last day of
the month in the year following a specified date? For example if the
date is (British style) 25/10/2009, I would like 31 October 2010.

Thanks for any help.
Dudley

DateSerial(Year(YourSpecifiedDate)+1, Month(YourSpecifiedDate)+1,0)
 
J

John W. Vinson

Is it possible to create a query field which will yield the last day of the
month in the year following a specified date? For example if the date is
(British style) 25/10/2009, I would like 31 October 2010.

Thanks for any help.
Dudley

Yes:

DateSerial(Year([specifieddate]), Month([specifieddate]) + 1, 0)

The zeroth day of next month is the last day of this month...
 
D

Dudley

Just what I need. Thanks very much to Rick and John.
Dudley

John W. Vinson said:
Is it possible to create a query field which will yield the last day of the
month in the year following a specified date? For example if the date is
(British style) 25/10/2009, I would like 31 October 2010.

Thanks for any help.
Dudley

Yes:

DateSerial(Year([specifieddate]), Month([specifieddate]) + 1, 0)

The zeroth day of next month is the last day of this month...
 

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