Question : Access 97 -  Convert Numbers from Decimal to Time

I need to convert numbers from decimals to time... I have already done so with small numbers successfully.

Example:
txtNumber=1.15
txtFormula=txtNumber/24

Result in txtFormula = 1:09


However, if you change txtNumber to a higher number like 128.15 the result is  8:09... where it really should be 128:09.  

Thanks.





Answer : Access 97 -  Convert Numbers from Decimal to Time

txtFormula = Fix(txtNumber) & ":" Format((txtNumber-Fix(txtNumber))*60,"00")

If txtNumber is a numeric variable and txtFormula is a text variable.
Random Solutions  
 
programming4us programming4us