>If I have a value of 72600, which represents the number of seconds elapsed since midnight, which also happens to be 08:10 pm, how do I convert that into a string that says simply 08:10 pm? Getting the hours is easy, it's the minutes I'm having a problem with. I think I'm going brain dead.
The other replies basically answered your question, but perhaps you want to know how to solve the math involved, since it can be used in a variety of situations (for instance, converting a monetary amount into available bills/coins).
TotalSeconds = 72600
Hours = int(TotalSeconds / 3600)
SecondsLeft = TotalSeconds - lnHours * 3600
Minutes = int(SecondsLeft / 60)
Seconds = SecondsLeft - 60 * Minutes
? padl(Hours, 2, "0") + ":" + padl(Minutes, 2, "0") + ":" + padl(Seconds, 2, "0")
Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)