A
Anand Vaidya
Excess_Less_Hrs_Worked,Net_Hrs_Worked,Regular_Work _Hrs are date/time fields
.. I would like to do some thing like this -
Excess_Less_Hrs_Worked = Net_Hrs_Worked - Regular_Work_Hrs
and if Net_Hrs_Worked < Regular_Work_Hrs then I want to store a negative
value for Excess_Less_Hrs_Worked else a positve value say like -1:20 and 2:35
respectively
the above line of code is giving a positive value irrespective of whether
the Net_Hrs_Worked < Regular_Work_Hrs or not.
Should I otherwise take two fields for Excess Hours Worked and Less Hours
Worked but I wanted to do it taking a single field so that it looks decent
when generating reports- displaying negative numbers with red color without
'-' sign before the number and positive numbers with blue/black color.
.. I would like to do some thing like this -
Excess_Less_Hrs_Worked = Net_Hrs_Worked - Regular_Work_Hrs
and if Net_Hrs_Worked < Regular_Work_Hrs then I want to store a negative
value for Excess_Less_Hrs_Worked else a positve value say like -1:20 and 2:35
respectively
the above line of code is giving a positive value irrespective of whether
the Net_Hrs_Worked < Regular_Work_Hrs or not.
Should I otherwise take two fields for Excess Hours Worked and Less Hours
Worked but I wanted to do it taking a single field so that it looks decent
when generating reports- displaying negative numbers with red color without
'-' sign before the number and positive numbers with blue/black color.