Do you want the output format to be a string or a date/time field? ALso, will you ever have hours or will it always be minutes and seconds. There's a few extra steps either way.
I'd tackle this with RSplits on the ':', and check the length of the first, second, and third parts adding leading zeros if needed. Then add them back together with ':' in between.
Str(Val(LSplit(RptTime,2,":",2)),2,0,"0")[/code]Like the input field, this is a Character field.
Edit: I suppose that the second Str(Val(LSplit is a bit needless as the zero padding already exists...[/QUOTE]
This worked perfectly! However, I would like to include this to my summary and perform a sum of all its values. Which means that the sum of...
should be = 00:97:17
A summary will not work because the field property is Character. how can I solve this???
That's an unusual presentation. Are you considering the first segment to be the number of days? Or is hh:mm:ss acceptable, meaning that 00:97:17 (should be 00:97:57?) is equivalent to 01:37:57?
If the formula given above is for a Character field named PreTime, then HMSTime is a Numeric (not date/time), with the format Time span applied, and uses the formula:
Summarizing HMSTime gives the total 01:37:57.
Is this acceptable?