|
-
February 3rd, 2008, 11:25 PM
#1
First of next month
I need to add a piece of criteria to a report.
It needs to say:
if datepurchased = 1st of next month then ......
Thank you for your help.
Rachel
-
February 4th, 2008, 12:25 PM
#2
Re: First of next month
Use the DAY() function
Code:
if Day(myDate)=1 then msgbox "First of the Month"
-
February 4th, 2008, 01:23 PM
#3
Re: First of next month
This report can be ran on any day, I need to know how to - for example:
its the 15th of may and I run this report, i need all records that the datepurchased is = the the first of the following month (april).
So, i would need the first of next month.
Rachel
-
February 4th, 2008, 02:05 PM
#4
Re: First of next month
You can get the current day and also the current month. Add 1 to the month, using DateAdd(), then get the first day to use in the sql statement.
-
February 4th, 2008, 04:02 PM
#5
Re: First of next month
Look in the help at DateSerial.
DateSerial(Year(d), Month(d) + 1, 1)
-
February 4th, 2008, 04:31 PM
#6
Re: First of next month
Thank you... I will check into it, at a quick glance i think that will work...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|