×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




Thanks to all who helped with this problem, especially to Crispin Bates
who provided a link that I used.

It worked the first time. Surprise! Surprise!

Here is my code sample for future reference:

*-----------------------------------------------------------------------
----
d convert_machine_timestamp...

d pr extpgm('QWCCVTDT')

d input_format 10a

d machine_timestamp...

d 20u 0

d output_format 10a

d output_variable...

d 20a

d

d error like(api_error)


*-----------------------------------------------------------------------
---
D unformatted_timestamp...
D 20u 0
d input_format s 10a inz('*DTS')
d output_format...
d s 10a inz('*YYMD')
d journal_timestamp...
d s 20a inz(*blank)
d stamptime s 26a
/free
convert_machine_timestamp(Input_format
:unformatted_timestamp
:output_format
:journal_timestamp
:api_error);
if api_error.bytes_available > *zero;
stamptime = %char(%timestamp());
else;
stamptime = %subst(journal_timestamp:1:4) + '-'
+ %subst(journal_timestamp:5:2) + '-'
+ %subst(journal_timestamp:7:2) + '-'
+ %subst(journal_timestamp:9:2) + '.'
+ %subst(journal_timestamp:11:2) + '.'
+ %subst(journal_timestamp:13:2) + '.'
+ %subst(journal_timestamp:15:4);
endif;
/end-free

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2026 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.