Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am using the makedate function like this:
MakeDate(Year(AddYears(Max([Process Date])-1,-5)), num(month(AddYears(Max([Process Date])-1,-5))), num(Date(Max([Process Date])-1,'DD')) )
and it does not work.
My maximum process date is : 09/15/2017, so the output should be 09/14/2012.
When I add this to makedate function:- num(Date(Max([Process Date])-1,'DD'))
it does not work.
but when I use this below:-
MakeDate(Year(AddYears(Max([Process Date])-1,-5)), num(month(AddYears(Max([Process Date])-1,-5))), 14)
it works fine.
Use
Day(Max([Process Date])-1)
And what about this (not using Makedate() at all)
Date(AddYears(Max([Process Date])-1,-5),'MM/DD/YYYY')
only this should work
addyears([Process Date],-5)-1
addyears(max([Process Date]),-5)-1