TimeStamp created in RPGLE and written to physical file is not in 24 hour format

pts.
Tags:
RPG
I have a program that writes out a record when ever a request is fulfilled. The record has a timestamp to know when it was filled but when ever the time stamp is written in the afternoon or evening the time stamp does not write 24 hour timestamp. Say it was filled at 3:14 PM, the timestamp should show 15:14:00. I have tested in other programs and it works correctly. Does anyone know why this program will not write out a record in the 24 hour format.

Answer Wiki

Thanks. We'll let you know when a new response is added.

What TIMFMT is used for the definition of the field? Is it *ISO or *HMS, or perhaps *USA?

Discuss This Question: 4  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Bud1960
    In your D specs, you can use a line similar to this... D Time S T TIMFMT(*HMS) This will make it say "151400". If you want a separator such as "15 14 00", you can use "TIMFMT(*HMS&)". Alternatively, you can change TIMFMT in your control specs. Hope That Helps! Bud
    0 pointsBadges:
    report
  • Hank12
    I do not define a varible inside of the program, I am using an extrally described file that I just move the date and time to the field. in my file the field is declaired as follows: LCFLDT Z COLHDG('FILL DATE') The code to update the field is: c eval lcfldt = %date + %Time I have also tried: c time lcfldt
    0 pointsBadges:
    report
  • Bud1960
    Hi! How do you have the field defined in your DDS? Maybe try using the TIMFMT(...) in there. I don't know just an idea to try. HTH Bud
    0 pointsBadges:
    report
  • EXPERTJohnBrandt
    D Timez S Z C Time TIMEZ C Move TIMEZ LCFLDT
    2,520 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following