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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Qulik2019
Contributor
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.

 

Labels (2)
1 Solution

Accepted Solutions
saar_lorena
Contributor III
Contributor III

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') 

 

View solution in original post

1 Reply
saar_lorena
Contributor III
Contributor III

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')