In my itemchanged event of a datawindow I'm calculating the time difference between two date fields for display purposes.
Right now it's calculating the time difference and returns the time in hours. For instance, if datetime fields say start = 1-1-07 10:00 end = 1-1-07 10:30 then result = 0.50
I need it to return 30 minutes for display.
I was able to get this working when user enter data like a time difference of 15,30,45,and 1 hour differfence ( i was able to convert 0.25, 0.75 , 0.50 properly ). however, i get inaccurate results when user enters something like
start = 1-1-07 02:00 end = 1-1-07 02:57 then i want to display 57minutes, but i'm getting 54 minutes because of round of issues.
please help me with this logic, i'm close but it's not working in returning for all sorts of time differences.