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

Compare two dates

Hi

Promised DateActual Date
01/01/201503/01/2015
23/01/201520/01/2015
23/01/201523/01/2015

Hi I want to make a new field say XYZ,

I want XYZ to be 1 id Actual Date is equal or less than promised date.

XYZ should be 0 otherwise.

How can I achieve this?

Please help.

Thanks

Arjun Jain

3 Replies
PrashantSangle

Hi,

Both field in same table then

write in script

if(ActualDate<=PromisedDate,1,0) as Flag

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 🙂
robert_mika
Master III
Master III

if(Actual Date<= Promised Day,1,0) as XYZ

pokassov
Specialist
Specialist

Hi!

t1

Load

     [Promised Date],

     [Actual Date],

     if( [Actual Date]<=[Promised Date],1,0)     as XYZ

Resident

     YourTable;

drop Table YourTable;

rename table T1 to YourTable;