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



A lot of different terms are used, it seems, for the same things. So I'm wondering about "system timestamp". Are these the same thing?

1. TOD value returned by the MATTOD MI function
2. System clock as discussed in documentation for CVTD MI function
3. *DTS as discussed in documentation for QWCCVTDT API

So far as I can tell, TOD and *DTS are the same, since the range of dates is the same - back to somewhere in 1928 and up through somewhere in 2071

Thanks
Vern

Paul Jackson wrote:
On Fri, Feb 19, 2010 at 5:22 PM, Simon Coulter <shc@xxxxxxxxxxxxxxxxx> wrote:
On 20/02/2010, at 10:47 AM, Paul Jackson wrote:

What is the current recommended method of converting a "system
timestamp" date (8 bytes) into a regular RPG native timestamp field?
I've seen a bunch of date and time API's/MI instructions out there so
was curious as to the best method to use. I will be doing this
conversion many hundreds of thousands of times and so would be looking
for the quickest method (assuming there is a big difference between
them).

I've used QWCCVTDT before, should I just stick with that?
That's the easiest method but is likely slower than the MI version.
You would be trading ease for speed. The only way to know for sure is
to perform empirical tests but I suspect the call overhead to the API
will be measurable over "many hundreds of thousands" of iterations.

If you use the MI built-in _CVTD then you'll need to build appropriate
DDAT structures for the input and output dates. Not difficult but lots
of sub-fields to set and offsets to calculate correctly.

Search the archives for additional information on DDAT structures.

Thanks Simon, I will search further.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.