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

AS400 Time

Status
Not open for further replies.

scott1971

Technical User
Joined
Apr 20, 2005
Messages
125
Location
EU
Can anyone tell me how to convert an AS400 Time Stamp to "proper" time. I need to group a report on working hours but I can't seem to get this to work. I thought I had it using:
Time (val(left(totext({HMEEXTRL.CHGTM},0,""),2)),val(mid(totext({HMEEXTRL.CHGTM},0,""),3,2))
,val(mid(totext({HMEEXTRL.CHGTM},0,""),5,2)))
but the AS400 time for 08:00am shows as 84941 so when the above formula runs it returns an error as it's looking for an hour of 84. I'm on CR XI and any help would be much appreciated.
 
Replace all totext(field,0,"") with totext(field, "000000")

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top