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



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


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.