I'm working on a weekly payroll report which shows hours worked for each day, if will show regular time, ot, vacation, sick, holiday. The View that the report is pulling from is populated from our erp system. When vacation, sick, or holiday hours are used it does not put it in a column on the right it will put it in the clock in-out column and populate it with a text string like this. " 8.45-PAID". It has two leading spaces. Also everywhere else in the report the minutes are displayed as a decimal not in minutes. The report has columns for Regular time, Overtime and Double, I took the double out and I'm trying to set it up like this Regular time, Over Time, Holiday, Vacation, and Sick.
I've been able to extract the 8.45 by using ToNumber(Mid({V_BI_TIME_CARD.EC1_DTL2},3,4)) which gives me the 8.45. but I'm stuck on trying to extracting the minutes out and converting it to decimal and putting it back together.
Also the particular field also contains other information depending on the record type field, like ""(empty), 8.45-Paid, 8.75 HRS(Uses for totals not single day), 12:00:59, 12:05:55, etc.
So I only want to do this when the record type equals a particular number for example,
For Sick Time
If {V_BI_TIME_CARD.EC1_CODE} = "02" Then
ToNumber(Mid({V_BI_TIME_CARD.EC1_DTL2},3,4))
Else 0.00
Holiday the code would equal "04". So if someone could help me take the 8.45 or whatever it is for the day and convert the minute value to a decimal so that i can use it to total up the row that would be great.
|