I am producing a time sheet database which records total worked hours for the day and this is recorded in minutes.
I am trying to split this up into hours and minutes for the user so see so I'm using the following:
Int(ValueInMinutes / 60) & " : " & (ValueInMinutes Mod 60)
The problem is that if minutes ever becomes a minus (we work flexible times here) then the hours is always added by one... so, if the minutes was '-10' then the it reads '-0 : -10' or '-65' reads '-2 : -5'
Does anybody have any suggestions about how I can improve this code?
Many thanks...
I am trying to split this up into hours and minutes for the user so see so I'm using the following:
Int(ValueInMinutes / 60) & " : " & (ValueInMinutes Mod 60)
The problem is that if minutes ever becomes a minus (we work flexible times here) then the hours is always added by one... so, if the minutes was '-10' then the it reads '-0 : -10' or '-65' reads '-2 : -5'
Does anybody have any suggestions about how I can improve this code?
Many thanks...