Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Experts,
i m trying to create a field with the following If condition.
IF(FRAC(TIMESTAMP) >'06:30:00' and FRAC(TIMESTAMP)<='18:30:00','06:30 - 18:30',
IF(FRAC(TIMESTAMP) >'18:30:00' and FRAC(TIMESTAMP)<='06:30:00','18:30 - 06:30',
IF(FRAC(TIMESTAMP) >'06:45:00' and FRAC(TIMESTAMP)<='18:45:00','06:45 - 18:45',
IF(FRAC(TIMESTAMP) >'18:45:00' and FRAC(TIMESTAMP)<='06:45:00','18:45 - 06:45')))) AS SHIFTHOURS
I m expecting to get the field values as:
SHIFTHOURS:
06:30 - 18:30
18:30 - 06:30
06:45 - 18:45
18:45 - 06:45
But my actual results are
06:30 - 18:30
06:45 - 18:45
I m missing two more values in the field. Am i doing anything wrong?
can someone please help me to correct the expression?
Hi,
You want output like this manner then if else wont help you
Try with Switch case when.
Syntax :
switch expression { case valuelist [ statements ]} [ default statements ]end switch
Search in help menu for details.
Regards,
Prashant