Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have date in 'MMM DD YYYY' format.
I am trying to get the data after 8/8/2015. So I am trying to convert the string into Date.
I am trying something like this:
=if(Date(Date#([As of Date],'MMM DD YYYY'),'MM/DD/YYYY')>='08/08/2015', 'Yes', 'No')
This is working only if, Month is greater than 'August'. If I select Jan 10 2016, it is dispalying the output as 'No'. I want to display it as 'Yes', as it is greater than 8/8/2015
Thanks in advance.
Best Regards,
Varun Reddy
Can you try this:
=If(Num(Date#([As of Date], 'MMM DD YYYY')) >= Num(MakeDate(2015, 8, 8)), 'Yes', 'No')
UPDATE: Tried a sample and it seems to work:
Table:
LOAD *,
If(Num(Date#([As of Date], 'MMM DD YYYY')) >= Num(MakeDate(2015, 8, 8)), 'Yes', 'No') as Flag;
LOAD * Inline [
As of Date
Jan 10 2016
];
Can you try this:
=If(Num(Date#([As of Date], 'MMM DD YYYY')) >= Num(MakeDate(2015, 8, 8)), 'Yes', 'No')
UPDATE: Tried a sample and it seems to work:
Table:
LOAD *,
If(Num(Date#([As of Date], 'MMM DD YYYY')) >= Num(MakeDate(2015, 8, 8)), 'Yes', 'No') as Flag;
LOAD * Inline [
As of Date
Jan 10 2016
];
Hi Sunny,
Why are we using Num?
=if(Date#([As of Date], 'MMM DD YYYY')>=MakeDate(2015,8,8), 'Yes', 'No')
Hi Maxgro,
Could you please explain we using Makedate?
You don't have to use it, but I like to do a date comparison in terms of numbers rather than in terms of date.
Some information on MakeDate() -> makedate ‒ QlikView
Generally, it is used to create a date ![]()
Sunny,
Thanks for the Quick response. Could you please explain the reason why are we using make date?
Regards,
Varun
Thanks Sunny ![]()
Seems it's working for me just like you said, maybe is something different? or I didn't get where was the problem?
edit:lot of conversation while I was testing, I should remember to refresh the page ![]()