× 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.



The 'gettimeofday' is the routine I remember...  I thought it was a "C"
binding call, but I was wrong... But the question comes to mind...

Software clock vs Hardware clock...  I was unware there was a difference...
I know you can change the date in a JOB run... Is that the same as the
software clock?

Tim

> -----Original Message-----
> From: rpg400-l-bounces@xxxxxxxxxxxx [SMTP:rpg400-l-bounces@xxxxxxxxxxxx]
> On Behalf Of Scott Klement
> Sent: Friday, April 23, 2004 10:45 AM
> To:   RPG programming on the AS400 / iSeries
> Subject:      Re: timestamp, microsecs.
> 
> 
> Hi Tim,
> 
> >     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...
> 
> 
> Two ways that I know of... one is the "gettimeofday" API which retrieves
> the time from the software clock (which may matter to you if your software
> clock is different from your hardware clock)
> 
> The other is embedded SQL, though I have no idea if that comes from the
> software or hardware clock?
> 
> Here's an SQL sample:
> 
>      D wrkTimeStamp    S               Z   Inz( *loval )
> 
>      C/exec sql
>      C+ set :wrkTimeStamp  = current timestamp
>      C/end-exec
> 
>      c                   dsply                   wrkTimeStamp
>      c                   eval      *inlr =*on
> 
> The gettimeofday() method has been posted in these forums (or perhaps it
> was MIDRANGE-L?) several times before.  Try searching for "gettimeofday"
> either on archive.midrange.com or else in Google...
> 
> _______________________________________________
> 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.
> 
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.

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.