Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
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.

3 Replies
swuehl
MVP
MVP

Use


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

swuehl
MVP
MVP

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


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

Kushal_Chawda

only this should work

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


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