Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Converting Seconds to Minutes?

Status
Not open for further replies.

Wenin

Programmer
Jun 28, 2004
7
US
Does Crystal come with a function that allows the easy conversion of Seconds to minutes? I am needing to run reports from a database that is storing its times in Seconds.

I'd like to avoid, but may have to just accept the fact that I'll need to come up with my own conversions.
 
Found this answer through a few searches.

numbervar sec:={your.seconds.field};

stringvar mins;
stringvar secs;

mins:=totext(truncate(sec/60),"0");
secs:=totext(remainder(sec,60),"00");

mins +":" + secs

Gave the guy a star to! =)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top