Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
ikenna94
Contributor
Contributor

Add days to date in table while loading from excel

Hello All,

I am trying to load data from an excel file into my QLIK app and at the same write a script to add a new column in my table plus 70 days ahead. I tried using this syntax below but, did not work.

 

DatesTable:


LOAD


Name,

lastname,

OldDate,

OldDate + 70 AS NewDate  


FROM [******************xls]
(***********************);

2 Solutions

Accepted Solutions
Channa
Specialist III
Specialist III

try date(datefield +70)

Channa

View solution in original post

pradosh_thakur
Master II
Master II

DatesTable:


LOAD


Name,

lastname,

OldDate,

date(num(OldDate) + 70) AS NewDate  


FROM [******************xls]
(***********************);

Make sure your date are in proper date fromat and not in string format

If it is in string format you may have to change it to

date#(olddate,date_format) and then use that to get the new date.

 

Regards

Pradosh

Learning never stops.

View solution in original post

3 Replies
Channa
Specialist III
Specialist III

try date(datefield +70)

Channa
pradosh_thakur
Master II
Master II

DatesTable:


LOAD


Name,

lastname,

OldDate,

date(num(OldDate) + 70) AS NewDate  


FROM [******************xls]
(***********************);

Make sure your date are in proper date fromat and not in string format

If it is in string format you may have to change it to

date#(olddate,date_format) and then use that to get the new date.

 

Regards

Pradosh

Learning never stops.
ikenna94
Contributor
Contributor
Author

Good Stuff. It works.