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

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
mwallman
Creator III
Creator III

How do get a date 320 days before a date?

Hi all,

I have the following date field:

Date(MakeDate(2012) + Ceil(Rand() * 365)) as Transaction_Date

How can I get a date 320 days before the Transaction_Date above? This would be a new field in the script

4 Replies
Colin-Albert
Partner - Champion
Partner - Champion

date(Transaction_Date - 320)

MK_QSL
MVP
MVP

Load *, Date(Transaction_Date-320) as New_Date;

Load

Date(MakeDate(2012) + Ceil(Rand() * 365)) as Transaction_Date

AutoGenerate 1

mwallman
Creator III
Creator III
Author

Thank you both you are both correct

sunny_talwar

If you got what you were looking for, please close the thread by marking the correct answer

Qlik Community Tip: Marking Replies as Correct or Helpful