×
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.
It would work. But it might be wrong. The problem with your technique,
Booth, is that it's reading from the system clock twice (whereas Brian's
was only reading from the clock once.) The problem with reading it
twice is that the two reads happen at slightly different times (perhaps
2 nanoseconds later, or something like that.)
Imagine if the first call (to get the date) happened at 23:59:59 so you
got a date of 2007-12-14. And the second call to get the happened at
midnight exactly (which would be 2007-12-15). Then your database might
contain records that say "it happened on 2007-12-14 00:00:00" which is a
day off!
It's better to read the system clock in all one call, as Brian did. It
doesn't change the coding significantly, and eliminates those "once in a
while" errors that happen when the user just happened to hit enter at
the wrong time...
Booth Martin wrote:
I am curious. Why wouldn't this work?
c eval sysdate = %dec( %date() : *ymd )
c eval systime = %dec( %time() : *hms
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.