I need to do the following to a date but Im struggling:
Revise:
MyDate: Date field "dd/mm/yyyy"
I want to change the year to the current year Now() "yyyy"
This was my solution.
Expr1: Format([MyDate],"dd/mm") & "/" & Format(Now(),"yyyy")
Calculation:
Then If my revised MyDate is less than Now() add 1 year to MyDate.
If not then use MyDate
then
Expr2: IIf([Expr1]<Now(),DateAdd("yyyy",1,[Expr1]),[MyDate])
whilst Im getting results, they are incorrect.
My thoughts are that I'm incorrectly changing MyDate which therefore means that my calculation is wrong.
Thanks for any advice.
Revise:
MyDate: Date field "dd/mm/yyyy"
I want to change the year to the current year Now() "yyyy"
This was my solution.
Expr1: Format([MyDate],"dd/mm") & "/" & Format(Now(),"yyyy")
Calculation:
Then If my revised MyDate is less than Now() add 1 year to MyDate.
If not then use MyDate
then
Expr2: IIf([Expr1]<Now(),DateAdd("yyyy",1,[Expr1]),[MyDate])
whilst Im getting results, they are incorrect.
My thoughts are that I'm incorrectly changing MyDate which therefore means that my calculation is wrong.
Thanks for any advice.