Hi,
I have a calculated field on my form which checks for the date of the last record in the database. (For ease, EVERY record is a 1st of month date.)
Now I need another calculated field which gives me the first of the month for "2 years ago, but one month on" if that makes any sense.
For example, just now, the last record in the database is 01/12/2007 (UK date format... 1st Dec) so I want the calculated field to return 01/01/2006 (1st Jan).
Next month, my last record in database will read 01/01/2007 and I will want the new field to return 01/02/2006. This will be useful in always providing a rolling two years worth of data which is what i need for further work.
I thought it should be something like
=DateSerial(Year([Latestdate])-1),Month([Latestdate])+11,1)
but I can't get it to work. Help!
I have a calculated field on my form which checks for the date of the last record in the database. (For ease, EVERY record is a 1st of month date.)
Now I need another calculated field which gives me the first of the month for "2 years ago, but one month on" if that makes any sense.
For example, just now, the last record in the database is 01/12/2007 (UK date format... 1st Dec) so I want the calculated field to return 01/01/2006 (1st Jan).
Next month, my last record in database will read 01/01/2007 and I will want the new field to return 01/02/2006. This will be useful in always providing a rolling two years worth of data which is what i need for further work.
I thought it should be something like
=DateSerial(Year([Latestdate])-1),Month([Latestdate])+11,1)
but I can't get it to work. Help!