Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I would like to make a condition :
IF(MIN_DATE_DEB > time('08:30:00','hh:mm:ss'),'qmem://<bundled>/BuiltIn/plus_g.png',
IF(MIN_DATE_DEB <= time('08:30:00','hh:mm:ss'),'qmem://<bundled>/BuiltIn/smiley2_b.png'))
it seems that it didn't work because I get one picture for all cases.
Any idea please?
Thanks
Hi,
did you delete the integer (date)part from your timestamp like suggested in your thread extract field?
Otherwise the comparison > 08:30 will always be true for dates later than 12/30/1899.
Try to extract the time part with an expression like the suggested
Time(Frac(MIN_DATE_DEB))
or maybe
Time#(Time(MIN_DATE_DEB,'hh:mm:ss'),'hh:mm:ss')
One example:
table1:
LOAD *,
Time#(Time(MIN_DATE_DEB,'hh:mm:ss'),'hh:mm:ss') as MIN_DATE_DEB_TIME;
LOAD Timestamp(Today()-Rand()*100) as MIN_DATE_DEB
AutoGenerate 100;
hope this helps
regards
Marco
Try this:
If(MIN_DATE_DEB > MakeTime(8, 30),' qmem://<bundled>/BuiltIn/plus_g.png', 'qmem://<bundled>/BuiltIn/smiley2_b.png')
I am curious will it work with this:
time((8*60+30)/24/60,'hh:mm:ss')
Or still wouldn't work and would be the same as time('08:30:00','hh:mm:ss')?
Hi,
did you delete the integer (date)part from your timestamp like suggested in your thread extract field?
Otherwise the comparison > 08:30 will always be true for dates later than 12/30/1899.
Try to extract the time part with an expression like the suggested
Time(Frac(MIN_DATE_DEB))
or maybe
Time#(Time(MIN_DATE_DEB,'hh:mm:ss'),'hh:mm:ss')
One example:
table1:
LOAD *,
Time#(Time(MIN_DATE_DEB,'hh:mm:ss'),'hh:mm:ss') as MIN_DATE_DEB_TIME;
LOAD Timestamp(Today()-Rand()*100) as MIN_DATE_DEB
AutoGenerate 100;
hope this helps
regards
Marco