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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Not Ready Time formula

Status
Not open for further replies.

Thant

Technical User
Dec 31, 2007
103
US
Greetings,
I have a field called NotReadyTime(number) it lists time an operator was in not ready status for Symposuim call center. It stores the field as seconds(number) and I need to convert it to HH:mm:ss format. I saw the faq on this but was unable to replicate. Any help would be appreciated
Thanks
 
Try this....it may have errors, i am typo-prone when not in front of crystal to test my math/syntax/etc. It should display as you wanted.


//{@NotReadyConv}
numbervar hh := (({NotReadyTime}/60)/60;
numbervar mm := (remainder(hh/60),60);
numbervar ss := (remainder((hh/60)/60,60));
(hh &":"& mm &":"& ss)

 
I had to add an extra ) to the formula so that the first half reads
Code:
//{@NotReadyConv}
numbervar hh := ({dAgentPerformanceStat.NotReadyTime}/60)/60;
numbervar mm := (remainder(hh/60))60);

It comes back and shows "The remaining text does not appear to be part of the formula
Code:
numbervar ss := (remainder((hh/60)/60,60));
(hh &":"& mm &":"& ss)

Any ideas?
 
i had:
numbervar mm := (remainder(hh/60),60);

you had:
numbervar mm := (remainder(hh/60))60);

It should bee:
numbervar mm := (remainder((hh/60),60));

sorry about that.
 




Simply convert SECONDS to DAYS and FORMAT the result using the FORMAT function.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Skip,
Thanks for the idea and I would love to do this but ive never really used this function before could you give me a little bit more detail?
Thanks
 



First
Declare {yourdays} as a non integtral data type.

{yourdays} = sec / 60(sec/min) / 60(min/hr) / 24(hrs/days)

Then either

{yourdate} = CTime({yourdays})

or

{yourdatestring} = ToText({yourdays},"hr:mm:ss")

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
I think I understand the where its going but I as I said variables are kind of new to me. How would I use setup the declare?

Thanks and sorry for being clueless
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top