Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Rama1
Contributor II
Contributor II

How i can insert Date field Column in Qlik sense Load Script

HI,

I want to Load next Sunday As my Date field.

Eg: Today is Tuesday i.e 26/11/2019 and i want my date  should be 1/12/2019, It should automatically load the next Sunday of the Coming Week, and should load for all the records

Can anyone help me how to do this as i am new to Qlik.

Note:There is no Date, Month,Year fields in my Data.

1 Solution

Accepted Solutions
Mauritz_SA
Partner - Specialist
Partner - Specialist

Hi there

You can add the following as a field to your load script.

Date(Floor(Weekend(Now(1),0,0)),'DD/MM/YYYY') AS Date

The date will always be the first Sunday after the data load is triggered. It will be 1/12/2019 for this whole week and change to 8/12/2019 when the data is loaded again after Sunday. You can have a look at different now functions.

Or do you want this date to change automatically when the user opens the app in the next week?

Regards,

Mauritz

 

View solution in original post

3 Replies
Mauritz_SA
Partner - Specialist
Partner - Specialist

Hi there

You can add the following as a field to your load script.

Date(Floor(Weekend(Now(1),0,0)),'DD/MM/YYYY') AS Date

The date will always be the first Sunday after the data load is triggered. It will be 1/12/2019 for this whole week and change to 8/12/2019 when the data is loaded again after Sunday. You can have a look at different now functions.

Or do you want this date to change automatically when the user opens the app in the next week?

Regards,

Mauritz

 

Rama1
Contributor II
Contributor II
Author

Hi Mauritz,

Thank you for the response.

Now my date field is 1/12/2019 and yes, I want this date to change automatically when the user opens the app in the next week.(is this possible when i am using Live data??)

And also i want to add even the Week based on the date filed. Week should start from Monday to Sunday as i want to generate my report on Monday for the upcoming Week i.e That week Monday to Sunday.

Could you please help on this?

Thank you

Regards

Rama

Mauritz_SA
Partner - Specialist
Partner - Specialist

Hi Rama

What is the use case for having this date available dynamically? Also, I am not sure what exactly you want with the week. Is it just the current week number? If so, I suggest that you look at the week and weekname functions.

Regards,

Mauritz