|
I think I got it from the same place Steve B * --------------------------------------------------------------- * * Procedure - GetMicroTime * * Description - Retrieve the current timestamp (26 bytes) that * * will have all six(6) bytes of the micro-time * * 2004-01-26-08.26.26.683160 <-- loaded * * * * Input - () None * * Output - Timestamp Field - 2004-01-26-08.26.26.683160 * * --------------------------------------------------------------- * P GetMicroTime B D GetMicroTime PI Z D CEEUTCO PR D hours 10I 0 D minutes 10I 0 D seconds 8F D gettimeofday PR 10I 0 extproc('gettimeofday') D time * value D timezone * value D timeval ds D tv_sec 10I 0 D tv_usec 10I 0 D RetVal s Z inz(z'1970-01-01-00.00.00') D hours s 10I 0 D mins s 10I 0 D FSecs s 8F D Secs s 20P 0 c callp CEEUTCO(hours: mins: FSecs) c eval Secs = FSecs c callp gettimeofday(%addr(timeval): *NULL) c adddur Secs:*S RetVal c adddur tv_sec:*S RetVal c adddur tv_usec:*MS RetVal c Return RetVal P E -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Hatzenbeler, Tim Sent: Friday, April 23, 2004 1:28 PM To: 'RPG programming on the AS400 / iSeries' Subject: timestamp, microsecs. When I do a timestamp operation I get a field like this... 2004-04-23-08.41.56.119000 Is there ay way to get values in the smallest three places? I remember a C function that Scott posted, but I can't seem to find it in the archive... Thanks, tim... This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential or privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy the message. _______________________________________________ This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/rpg400-l or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.
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.