Hello,
I am very new to programming and PHP, I have 3 fields "TIMIN" captures the log in time "TIMOUT" captures the time out
and "TOTTIME" is supposed to get the difference of "TIMIN" - "TIMOUT"
the way the time fields were created is a bit restricting they are only 6 digits so I have to get the time as a number,
for example for 10:55 AM the way I pass the value to the database is 1055
I have seen a few examples where the time out is the time in is substracted from the time out and then divided by 60
this does not work, let's say an employee logs in at 1055 and logs out at 1110 the "TOTTIME" sould be .15
if I do the calculation the total time 1110 - 1055 = 55 / 60 = .9166
Any help is much appreciated.
thanks!!!
I am very new to programming and PHP, I have 3 fields "TIMIN" captures the log in time "TIMOUT" captures the time out
and "TOTTIME" is supposed to get the difference of "TIMIN" - "TIMOUT"
the way the time fields were created is a bit restricting they are only 6 digits so I have to get the time as a number,
for example for 10:55 AM the way I pass the value to the database is 1055
I have seen a few examples where the time out is the time in is substracted from the time out and then divided by 60
this does not work, let's say an employee logs in at 1055 and logs out at 1110 the "TOTTIME" sould be .15
if I do the calculation the total time 1110 - 1055 = 55 / 60 = .9166
Any help is much appreciated.
thanks!!!