Ken,

RTVSYSVAL  SYSVAL(QMONTH) RTNVAR(&QMONTH)
RTVSYSVAL  SYSVAL(QDAY) RTNVAR(&QDAY)
RTVSYSVAL  SYSVAL(QYEAR) RTNVAR(&QYEAR)
RTVSYSVAL  SYSVAL(QTIME) RTNVAR(&QTIME)

The trouble with that is that you run the risk of a timing error. If by some break chance, this code happens to run exactly on the stroke of midnight, you could have problems. For example, you might retrieve QYEAR at 23:59:59, and you might retrieve QTIME at 0:00:00. Then your date would be one day different from your time! And, of course, there'd be no way for your program to detect it.

I know it's a 'one in a million' shot, but it's happened to me, and it took quite a long time (nearly 2 days) to get our records straightened out.

Consequently, I recommend that you always retrieve the date and time in one call... use RTVSYSVAL SYSVAL(QDATETIME) or RTVJOBA DATETIME(&VAR), or if you're on an older release, use an API to get the current date and time... it's not that difficult, but it can save you a lot of grief, later!

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.