Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a CREATION_DATE field which is a timestamp. E.G. 01/01/2018 18:00:00 in the format DD/MM/YYYY hh:mm:ss
I am trying to do a simple If statement whereby the time part of the timestamp is less than 14:30:00.
My code is below, however everything gets the 'N' value no matter what the value is.
IF(time(CREATION_DATE)<='14:30:00','Y','N')
It cant be that difficult, is it?
Thanks!
The actual answer i needed was:
If(Num(Frac(CREATION_DATE))<=Num(MakeTime(14,30,00)),'Y','N')
But I'll give it to you because you set me on the right track! Thanks!
If(Num(Frac(Timestamp#(CREATION_DATE,'D/MM/YYYY hh:mm'))<=Num(MakeTime(14,30,00)),'Y','N')
Looks like you were comparing num to string..
may be change
IF(time(CREATION_DATE)<=MakeTime(14,30,00),'Y','N')
The actual answer i needed was:
If(Num(Frac(CREATION_DATE))<=Num(MakeTime(14,30,00)),'Y','N')
But I'll give it to you because you set me on the right track! Thanks!