Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
ananyaghosh
Creator III
Creator III

need makedate help

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.

Labels (1)
3 Replies
swuehl
Champion III
Champion III

Use


Day(Max([Process Date])-1)

swuehl
Champion III
Champion III

And what about this (not using Makedate() at all)


Date(AddYears(Max([Process Date])-1,-5),'MM/DD/YYYY')

Kushal_Chawda
MVP
MVP

only this should work

addyears([Process Date],-5)-1


addyears(max([Process Date]),-5)-1