Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
Announcing the newest addition to the Qlik Community, Qlik Gallery! Learn More
Qulik2019
New Contributor

Adding Column of Days to a Column of Dates

I am currently trying to add a column of days (labeled 'Aging') to a column of Dates (labeled 'Reportdate'), but my code keeps breaking my table.  My information is coming from an excel sheet.

My current code is as follows: Date(Date#(Reportdate,'YYYY-MM-DD')+ Aging) as NewDate

What am I doing wrong and how do I fix it?

Thank you in advance.

 

1 Solution

Accepted Solutions
Highlighted
saar_lorena
New Contributor III

Re: Adding Column of Days to a Column of Dates

Date#() -> is used to interpret the data.

Example: Date#('17/06/2019', 'DD/MM/YYYY')  means that the first two digits are day, the second two digits are months and last 4 digits are year.

 

Data() -> is used to show the data.

Example: Date(today(), 'YYYY-MM-DD') means that you want to show the data with the format as your parameter.

Both functions together:

 Date(Date#(Reportdate,'YYYY-MM-DD') + Aging, 'YYYY-MM-DD') 

 

1 Reply
Highlighted
saar_lorena
New Contributor III

Re: Adding Column of Days to a Column of Dates

Date#() -> is used to interpret the data.

Example: Date#('17/06/2019', 'DD/MM/YYYY')  means that the first two digits are day, the second two digits are months and last 4 digits are year.

 

Data() -> is used to show the data.

Example: Date(today(), 'YYYY-MM-DD') means that you want to show the data with the format as your parameter.

Both functions together:

 Date(Date#(Reportdate,'YYYY-MM-DD') + Aging, 'YYYY-MM-DD')