Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Convert a whole number to minutes and seconds??? Post Reply Post New Topic
Author Message
dawnh44
Groupie
Groupie


Joined: 25 Sep 2011
Online Status: Offline
Posts: 79
Quote dawnh44 Replybullet Topic: Convert a whole number to minutes and seconds???
     Posted: 10 Oct 2011 at 5:55am
Hello everyone,
 
I have a couple of whole numbers that I need to be converted to minutes and seconds.  So, I have a number like 63, but I need it to be formatted to show 00:01:03.  Can anyone please help me?
 
Thank you in advance. Smile
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 10 Oct 2011 at 6:09am
local numbervar tt := table.value;
local numbervar h := truncate(tt/60,0);
local numbervar m := truncate(remainder(tt,60),0);
local stringvar tt_h := totext(h,"00")+":";
local stringvar tt_m := totext(m,"00");
local stringvar tt_string := "00:" & tt_h & tt_m


Edited by DBlank - 10 Oct 2011 at 8:50am
IP IP Logged
dawnh44
Groupie
Groupie


Joined: 25 Sep 2011
Online Status: Offline
Posts: 79
Quote dawnh44 Replybullet Posted: 10 Oct 2011 at 12:26pm
Has anyone told you how wonderful you are lately?  Thank you, thank you, thank you so much.  You are the greatest!!!!!!!!!!!
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum