Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

problem with subtracting days from date column

Hello Experts,

I have date column as time full date and it is having dates like daily. In report i want to display dates as subtract 7 days from time full date as mention below.

I tried with date(interval([Time Full Date] - 7,'D'),'YYYY/MM/DD'), but it is working for only first value and rest of dates are displaying continuosly. Pls help me out on this one.

Regards,

Kumar

10 Replies
danieloberbilli
Specialist II
Specialist II

date(floor([Time Full Date]) - 7,'DD/MM/YYYY')

danieloberbilli
Specialist II
Specialist II

in case that Time Full Date is a timestamp,

else just      date(num([Time Full Date]) - 7 , 'DD/MM/YYYY')

Anonymous
Not applicable
Author

Dates can be tricky with qlikview.  Whenever I'm in doubt I'll convert the date field in the script to a number.  So create a second field Num([Time Full Date]) as [Time Full Date #] and use that in the interval expression you have above.

Anonymous
Not applicable
Author

Hi Daniel,

As you suggested above I tried, but it doesn't work out. Pls see the screenshot.

PrashantSangle

Hi,

This must work.

Try this in Script.

Provide your sample apps?

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 🙂
danieloberbilli
Specialist II
Specialist II

PFA my example and compare it to yours.

Kind Regards

Daniel

Anonymous
Not applicable
Author

Hi,

Pls find the app.

Regards,

Kumar

PrashantSangle

Hi,

169.6  MB How could you able to upload such huge file???

If possible post reduced file??

Use limited load

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 🙂
Anonymous
Not applicable
Author

Hi

I have converted in script, but it is giving as same as previous. First date value is being deducting and rest of dates are displaying continuously.

Regards,

Kumar