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

converting time from seconds back to hh:mm:ss 2

Status
Not open for further replies.

cmacd

Technical User
Oct 24, 2001
4
US
I need help with converting a time field from seconds back to hh:mm:ss

Thanks,
CMacD
 
I used this formula when trying to format my date fields, perhaps this may help with the time?

(Left(Right((IIF((Length(Replace (ToText({TABLENAME.FIELD},0),&quot;,&quot;,&quot;&quot;)))<6, &quot;0&quot;
+ (Replace (ToText({TABLENAME.FIELD},0),&quot;,&quot;,&quot;&quot;)), (Replace (ToText({TABLENAME.FIELD},0),&quot;,&quot;,&quot;&quot;)))),6),2))

+ &quot;:&quot;

+ (Left(Right((IIF((Length(Replace (ToText({TABLENAME.FIELD},0),&quot;,&quot;,&quot;&quot;)))<6, &quot;0&quot;
+ (Replace (ToText({TABLENAME.FIELD},0),&quot;,&quot;,&quot;&quot;)), (Replace (ToText({TABLENAME.FIELD},0),&quot;,&quot;,&quot;&quot;)))),4),2))

+ &quot;:&quot;

+ (Right((IIF((Length(Replace (ToText({TABLENAME.FIELD},0),&quot;,&quot;,&quot;&quot;)))<6, &quot;0&quot;
+ (Replace (ToText({TABLENAME.FIELD},0),&quot;,&quot;,&quot;&quot;)), (Replace (ToText({TABLENAME.FIELD},0),&quot;,&quot;,&quot;&quot;)))),2))
 
I think there is a formula in my FAQ that will do this: faq149-243 Ken Hamady, On-site/Phone Crystal Reports Training/Consulting
Quick Reference Guide to using Crystal in VB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top