× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Steve,

I had timestamps on the brain - this is more than you asked for!! The %date() part will do what you asked.

Vern

On 8/4/2010 5:02 PM, Vern Hamberg wrote:
Steve

If you on at least V5R3 you can do something like this -

d date13 s 13a inz('1100802144806')
d realdate s d
d realtime s t
d realts s z

/free
realdate = %date(%subst(date13 : 1 : 7) : *CYMD0);
realtime = %time(%subst(date13 : 8 : 6) : *HMS0);
realts = %date(%subst(date13 : 1 : 7) : *CYMD0) + %time(%subst(date13 : 8 : 6) : *HMS0);
*inlr = *on;
/end-free

You can also do the %date() and %time() stuff inlinr in the realts assignment -

realts = realdate + realtime;

This actually works - I just tried it!

Vern

On 8/4/2010 4:24 PM, sjl wrote:
All -

I'm using the QUSRMBRD API to retrieve member description information.

The member creation date is a 13-byte alpha value returned in the form
CYYMMDDHHMMSS.

Example: '1100802144806' (August 8, 2010, 14:48:06)

What is the correct way to convert this value into a date field for
performing a date comparison in an RPG program?

Regards,
sjl







As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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

This mailing list archive is Copyright 1997-2024 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.