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

Ctime

Status
Not open for further replies.

hbussell

Technical User
Mar 19, 2001
13
US
Is there a way in CR7 to convert a string to time? I know Ctime does this in CR8 but I need to add this report to a program that uses the viewer and it does not work with the Ctime.
 
hbussell: CR7 will support the use of the Time() function so all you need to provide are the Hour, Minute and Second arguments. These could be obtained by the following formulas:

Hour
Val({TImeString}[1 to 2])
Minute
Val({TimeString}[3 to 5])
Seconds
Val({TimeString}[7 to 9])

This assumes TimeString is e.g. "23:59:00"

HTH David C. Monks
david.monks@chase-international.com
Accredited Crystal Decisions Enterprise Partner
 
Oops! Must remember to engage brain before hitting Enter :))

Formulas should have read:

Hour
Val({TImeString}[1 to 2])
Minute
Val({TimeString}[4 to 5])
Seconds
Val({TimeString}[7 to 8])
David C. Monks
david.monks@chase-international.com
Accredited Crystal Decisions Enterprise Partner
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top