Skip to Content
0
Former Member
Jun 06, 2007 at 07:58 PM

compare mm/yyyy

277 Views

Post Author: dura13

CA Forum: Formula

HI

I'm having trouble figuring out the formula to compare the month/year of 1 field versus the month/year of another.

Here's what I have sofar.

dateadd("m",-6,currentdate) this will take me back 6 months to todays date, but i want the month/year and not the month/day/year. The second variable will be an invoice date that I want to also be in the format month/year and this is where i need the year to come into play.

Any suggestions on how i can either drop the day parameter from both dates or is i just easier to do something along this line.

(dateadd("m",-6,currentdate) - (day(currentdate) - 1))

  • just thought of this formula as i was writing the question **

Thanks in advance

I realized this won't work as it only gets me to the first day of the month. I really need to format these date fields in the formula to be month/year.