Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
pirotfab
Creator
Creator

fonction date

Hello,

Do you know a function that gives me automatically?

the date of the last year - 1 day  : depending on the selection.

(EX:  today = 02/03/2016, I want the variable 01.03.2015)

My variable = date (Num (Today ()) - 367, 'DD / MM / YYYY')

the "367" is good only for this year.

Thank you in advance

Fabien

1 Solution

Accepted Solutions
Peter_Cammaert
Partner - Champion III
Partner - Champion III

Even better:

AddYears(Today(), -1) - 1

View solution in original post

4 Replies
sunny_talwar

This year is 367 or 366?

You can use AddYears() function

AddYears(Today(), -1)

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Even better:

AddYears(Today(), -1) - 1

pirotfab
Creator
Creator
Author

Thanks,

AddYears(Today(), -1) -1 its perfect

Peter_Cammaert
Partner - Champion III
Partner - Champion III

If your question has been answered to satisfaction, please close the discussion by marking an answer as Correct. That answer will appear in the same frame as your original post at the top, making it easier for other Community Members to find Question & Answer. Thanks.

Peter