Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I wonder how I compare two dates when I use the function monthend, when using in an if statement always gives false, for example:
=if(monthend('31/10/2013') = '31/10/2013', 1,0)
Thank you.
Hi,
It will work
=if(Floor(monthend('31/10/2013')) = Num(Date('31/10/2013')), 1,0)
Monthend is the timestamp of the last ms. Floor(monthend(...))= or Date must be used.
Monthend returns a numeric date, but needs a numeric date as input. You're comparing it to a string. That comparison will always return False. You need to turn the strings into a dates using the date# function:
=if(floor(monthend(date#('31/10/2013','DD/MM/YYYY'))) = date#('31/10/2013','DD/MM/YYYY'), 1,0)
Worked for a fixed date, but when I put the script, using a date in a table, all return 0 ...:
if(floor(monthend(date#(DATA,'DD/MM/YYYY'))) = date#(DATA,'DD/MM/YYYY'), 1,0)
Hi
Convert both as number and check it.
Hope tat helps
Worked in an expression within a list, but in the script all dates were 0
Hi,
It will work
=if(Floor(monthend('31/10/2013')) = Num(Date('31/10/2013')), 1,0)
Thanks!