Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
kevbrown
Creator II
Creator II

New Date Field

Simple question I'm sure but I just can't think of the answer! I have a spreadsheet but it doesn't contain DATE. I really need to have Date in the data so how do i add a field in the script for date. The date would need to be Todays date - 8.

Thanks

1 Solution

Accepted Solutions
Not applicable

date(today(),'Specify format ')-8 as NewDate

View solution in original post

7 Replies
sunny_talwar

Like this may be:

LOAD *,

          Date(Today() - 😎 as Date

FROM Source;


UPDATE: Please note that this will keep on updating every day unless you are doing an incremental load where you save the result into qvd after each reload.

Not applicable

date(today(),'Specify format ')-8 as NewDate

kevbrown
Creator II
Creator II
Author

That's great, thanks Harshal. One other question, it's now coming down as a number but I want it as a dd/mm/yyyy

sunny_talwar

Slight modification:

Date(Today()-8,'Specify format ') as NewDate


Date(Today()-8,'DD/MM/YYYY') as NewDate

PrashantSangle

Hi,

try like

date(today()-8,'DD/MM/YYYY') as newDate

Kind Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Not applicable

Hi Kevin

Can you do like this,so that you will get your expected result

                   date(today()-8,'DD/MM/YYYY') as Date

Regards,

Sreenadha

kevbrown
Creator II
Creator II
Author

Thats great, thanks.