Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a date format like
1. date(YYYY-MM-DD) and
2. date(YYYY-MM-'28') as Date
I have to compare 2 dates if 1>2,'Late','Not Late'.
When I tried it always showing as false condition
you can try with this,
if(num(date(datefield1,'YYYY-MM-DD')) >num(date(datefield2,'YYYY-MM-DD')) ,'Late','Not Late')
=if(num(date(MakeDate(2011,01,12),'DD-MMM-YYYY')) > num(date(MakeDate(2011,01,6),'DD-MMM-YYYY')),'Yes','No')
You mean to say you want to compare all dates with 28th of the same month?
Please clarify so that we can help further.
Yes.
=if(Num(date#('2018-01-29','YYYY-MM-DD')) >num(date#('2018-01-28','YYYY-MM-DD')) ,'Late','Not Late')
if not working, pl provide some example dates
Hi,
Where is your data coming from, i.e. database?
In some instance it's best to FLOOR the date and format the output before you can compare the 2 fields.
Gabriel
if(datefield < monthstart(datefield) + 28,'Not late','late')
oops + 27