Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need to identify rows where a future date is next month 1

Status
Not open for further replies.

bloko

Programmer
Feb 22, 2010
26
GB
Hi,

I am usuing a formula

if (month({FutureDate}) = (month(currentdate) + 1)) and (year({FutureDate}) = year(currentdate))
then
"Y" else "N"

And this works for 11 months of the year but I remember last year this didnt work due to the year(currentdate) part of the formula and I never got round to fixing but now december is coming up so will have to manually change the formlua. Is there anything someone could suggest so I don't have to keep changing manually.

Thanks
 
if date(year({table.futuredate}),month({table.futuredate}),1) =
dateserial(year(currentdate),month(currentdate)+1,1) then
"Y" else
"N"

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top