Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a variable which is defined as follows
vTimeDiff = Interval([Deliver By Time]- [Delivered Time],'mm')
This gives me the time interval in minutes between the two dates as -1094
If I use this in an if statement and compare to a negative value I get wrong results
example
if($(vTimeDiff) < -120,1,0) returns a result = 0, should retuirn 1 since -1094 < -120
When I hardcode the value of the variable to -1094 rather than the interval function
The if statement evaluates correctly
vTimeDiff = -1094
example
if($(vTimeDiff) < -120,1,0) returns a result = 1, which is correct
Would appreciate any help on this matter ?
hi interval returns time number
so the display shows -1094
bu actually it around 18 hours which translate to around 0.75 in numeric values
if you want to translate it to numeric minutes
just use
vTimeDiff = Interval([Deliver By Time]- [Delivered Time],'mm')*1440
I have create similar function in my PC and working fine. Can you please upload your sample data file?
hi interval returns time number
so the display shows -1094
bu actually it around 18 hours which translate to around 0.75 in numeric values
if you want to translate it to numeric minutes
just use
vTimeDiff = Interval([Deliver By Time]- [Delivered Time],'mm')*1440
Thanks Liron, that works perfectly