p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Access (http://p2p.wrox.com/forumdisplay.php?f=18)
-   -   query Current Month, Month+1, Month+2, Month+3 (http://p2p.wrox.com/showthread.php?t=48103)

anterior September 20th, 2006 09:50 PM

query Current Month, Month+1, Month+2, Month+3
 
I am trying to generate a report which displays data from an Invoicng Table.
The table contains date time field (as "mmmm\ yyyy")
The table has old data going back more than 12 months plus data which is dated for future invoicing (more than 12 months forward).

I need to generate reporting of future 6 months, and need the report columns to automatically reflect

Current Month
Current Month+1
Current Month+2
etc..

I can use date part to add 1 month, 2 months, 3 months. but run into trouble where the year changes.

Any help would be greatly apprecited.

Dave

SerranoG September 21st, 2006 10:37 AM

Don't use DatePart, use the DateAdd function.

Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division

anterior September 24th, 2006 08:25 PM

Thanks Greg, I've also now used DateSerial(Year(Date()),Month(Date())+1,0) + 2 + 3 etc and this nis working well.

Thanks again

Dave


All times are GMT -4. The time now is 08:32 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.