Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Date Issues in Script

I have two date columns in a table and our want QlikView to compare the two dates for each row but it is not doing correctly. my guess is that the two sets of dates are in a different format,so I tried converting both to a number using Num or converting both to Date but still having issues. Any ideas?

29 Replies
Anonymous
Not applicable
Author

I tried this but still did not work. Could it be anything else?

Anonymous
Not applicable
Author

My version of QlikView did not understand the cast command

vishsaggi
Champion III
Champion III

May be try this? Extending Sunnys expression.

LOAD *

Where LEADCREATEDATEdup > STAGEMODIFYDATE;

Load *,
     Date#(LEADCREATEDATE, 'DD-MMM-YYYY') as LEADCREATEDATEdup,

     Date#(STAGEMODIFYDATE, 'DD-MMM-YYYY') as STAGEMODIFYDATEdup
Resident onlymodifydateforopps ;


Drop Table onlymodifydateforopps;

sunny_talwar

What format is STAGEMODIFYDATE and LEADCREATEDATE are in?

Anonymous
Not applicable
Author

MM/DD/YYYY which is what I used instead of the one you gave me

Anonymous
Not applicable
Author

To be precise, the original format looks something like this:

12/21/2015  5:04:57 PM

To me the time of day piece is not important really.

Anonymous
Not applicable
Author

This is the format for both of them

Anonymous
Not applicable
Author

Did you mean the top portion to say

LOAD *

Where LEADCREATEDATEdup > STAGEMODIFYDATEdup;

sunny_talwar

Then try this:

dateforoppsbeforelead:
Load *,
     LEADCREATEDATE as LEADCREATEDATEdup
Resident onlymodifydateforopps

Where Date#(LEADCREATEDATE, 'MM/DD/YYYY h:mm:ss TT') >Date#(STAGEMODIFYDATE, 'MM/DD/YYYY h:mm:ss TT') ;

Drop Table onlymodifydateforopps;

Anonymous
Not applicable
Author

should I try timestamp instead or it does not matter?