Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Difference between two days

I have a table which contain two coloumn.

Let the first Coloumn is Date and second Column is Value.

where, value = (Today() - Date)

It shown like:----

Date                               Value

18/04/11                          99

18/04/11                          100

10/09/11                          155

10/09/11                          139

10/09/11                          136

I use the date format as DD/MM/YYYY

It's not shown the correct value. Please help me!!!!!!!

17 Replies
Not applicable
Author

Then why I get this kind of result??

date          value     

02/04/11      26

02/04/11      17

02/04/11      13

02/04/11      14

02/04/11       23

its_anandrjs

Hi,

I think it is not issue of timestamp, can you upload small application with few data so i can check that or i want to ask from where you load this data it is excel file if so please once check the format.

Rgds

Anand

SunilChauhan
Champion II
Champion II

anaand

i agree with you anand but can plese tell me what are different part which make a timestamp.

please describe.

anup

can please upload a sample and mention what is your actual output u want.

Sunil Chauhan
Not applicable
Author

Anand I load this data from SQL Server. Not from Excel. Please check the attachment, I send you the file as Excel format...

Not applicable
Author

Please check the attachment, I send you the file as Excel format...

SunilChauhan
Champion II
Champion II

if (Billdate=today(),Amount) -Amount

hope this helps

Sunil Chauhan
its_anandrjs

Hi,

See the updated file i load your file and make new date as

Date(Date#(BillingDate,'DD/MM/YYYY')) AS New_Date

See the attached sample file.

Let me know abot this.

Rgds

Anand

Jason_Michaelides
Luminary Alumni
Luminary Alumni

Based on your supplied data:

LOAD

          RangeName,

          BillingDate,

          Today()-BillingDate          AS          [Value(Difference)],

          Amount

FROM

[CH01_20110922_161855.xls]

(biff, embedded labels, table is Sheet1$);

Seems to work just fine, so as Sunil suggested there may be an issue with your raw data. Can you post some data straight from SQL for us to look at, rather than exporting the (probably incorrect) data from a QlikView output?

Thanks,

Jason