I am extremely new to Progress and OpenEdge, so bear with me. I may not be describing things correctly either, sorry for that. I am using OpenEdge 11.1. I am writing a procedure to build a report from an OpenEdge database. There is a field called hours which is a character field. There is a field called dec-hours which is a decimal because they are breaking the hours down into decimals so that they can be calculated easier. I need to calculate the hours they went over or under and the percent of unused hours. I have an error referring to incompatible data types, I am guessing that it has to do with that? I have been looking online and cannot seem to find what I need.
Is there something to convert a character field to a decimal? Or is there something I can try?
ttKReport.cBudgHours = time-r.hours
ttKReport.dActHours = time-r.dec-hours
ttKReport.dOverUnderHours = time-r.hours - time-r.dec-hours
ttKReport.dPercentUnused = ( (time-r.hours - time-r.dec-hours) / time-r.hours) * 100
Thank you in advance!
Tracy
ttKReport.cBudgHours = decimal(time-r.hours)
ttKReport.dActHours = time-r.dec-hours
ttKReport.dOverUnderHours = decimal(time-r.hours) - time-r.dec-hours
ttKReport.dPercentUnused = ( (decimal(time-r.hours) - time-r.dec-hours) / decimal(time-r.hours)) * 100
Thank You so much. I will get it eventually. It is a little overwhelming looking stuff up sometimes.
Oh and sorry if I had known I only had one option I would have clicked correct answer. I am learning.
You might also be interested in this http://www.oehive.org/project/isNumber at some point.