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

string to time format 1

Status
Not open for further replies.

MartUK

MIS
Jul 25, 2007
31
GB
I am using CR XI
I have a string field relating to time 8 characters long wich I need to convert to time

eg 07181244

left({FSCACT.FSCACT_CREATE_TIME},4) gives 0718 which I need to convert to 07:18:00. How can I do this please?
 
Use:

time(val(left({table.string},2)),val(mid({table.string},3,2)),val(mid({table.string},5,2)))

Or if you want to show seconds as zero, use:

time(val(left({table.string},2)),val(mid({table.string},3,2)),0)

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top