Steve-vfp9user
Programmer
I am trying to find a way to convert two fields so I can auto calculate the hours and minutes between the two.
I have some code that already calculates the time taken by adding several fields which I'm sure I can adapt.
LnH1=INT(Monday)+INT(Tuesday).....
LnM1=Monday+Tuesday.....
LnM=LnM1 % 0.6
LnH=LnH1+INT((LnM1-LnM)*5/3
REPLACE MYFIELD with LnH+LnM
This is ok because the field Monday, Tuesday etc are numeric 6,2 and the MYFIELD is also numeric 6,2
My problem is that in the app I'm working on has two fields timefrom and timeto both are Character 5 with an input mask !!:!!
What I'm trying to achieve is for example have:
Time from: 14:45
Time to: 16:30
Replace HOURSMINS with 1.45
HOURSMINS is a numeric 6,2 field
I would appreciate any pointers.
Thank you
Steve
I have some code that already calculates the time taken by adding several fields which I'm sure I can adapt.
LnH1=INT(Monday)+INT(Tuesday).....
LnM1=Monday+Tuesday.....
LnM=LnM1 % 0.6
LnH=LnH1+INT((LnM1-LnM)*5/3
REPLACE MYFIELD with LnH+LnM
This is ok because the field Monday, Tuesday etc are numeric 6,2 and the MYFIELD is also numeric 6,2
My problem is that in the app I'm working on has two fields timefrom and timeto both are Character 5 with an input mask !!:!!
What I'm trying to achieve is for example have:
Time from: 14:45
Time to: 16:30
Replace HOURSMINS with 1.45
HOURSMINS is a numeric 6,2 field
I would appreciate any pointers.
Thank you
Steve