Wtime = %Dec(% Char(% Time(): * ISO0):6:0); < In my programs, I produce a data structure like this: D DS D Dtime 14 0 D Wdate 8 0 Overlay( Dtime). D Wtime 6 0 Overlay( Dtime: * Next). Ive been utilizing TIME to assign a worth to Dtime, then I utilize Wtime and Wdate to designate values to work fields. How can I do this in complimentary format? If you do not define a worth for the %DATE, %TIME, and %TIMESTAMP functions they will return the present date, time, or timestamp. Its an easy matter to convert that value to a number in your data structure. D DS. D Dtime 14 0. D Wdate 8 0 Overlay( Dtime). D Wtime 6 0 Overlay( Dtime: * Next). Heres one of the totally free format BIFs I can never keep in mind as far as syntax is concerned. If I keep it here I will be able to discover it again:-RRB-, maybe. I copied some of this from http://www.bmeyers.net/faqs/frequently-asked-questions/41-free-format-alternatives-to-time (the Q&A part). Q. In repaired format RPG IV, I used the TIME operation code to get the present date and time; but TIME is not supported by free format. You mentioned that the %DATE, %TIME, and %TIMESTAMP functions can replace TIME, however Im not exactly sure how to utilize them for this purpose. // V5R3:. Wtime = %Dec(% Time(): * ISO);. Wdate = %Dec(% Date(): * ISO);.
Free Format RPG ILE Alternatives to the TIME Opcode