Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread Limiting Precision of CURRENT_TIME
Tue, Jun 12 2007 5:50 PMPermanent Link

Gordon Turner
Is there a way to use CURRENT_TIME to set a Time field value, but limit
it to Hours and Minutes, or Hours, Minutes & Seconds (01:15:00 PM or
01:15:03 PM instead of 01:15:03.0843 PM)?  I'm using the Time field as a
part of my primary key, and trying to re-select the record after the
time to (at least) 4 decimal places is recorded makes it really hard (if
not impossible).

--
Gordon Turner
Mycroft Computing
http://www.mycroftcomputing.com
Tue, Jun 12 2007 7:09 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Gordon,

<< Is there a way to use CURRENT_TIME to set a Time field value, but limit
it to Hours and Minutes, or Hours, Minutes & Seconds (01:15:00 PM or
01:15:03 PM instead of 01:15:03.0843 PM)?  I'm using the Time field as a
part of my primary key, and trying to re-select the record after the time to
(at least) 4 decimal places is recorded makes it really hard (if not
impossible). >>

You can do so, but it is a little convoluted.  You have to EXTRACT each
field from the time and then cast the whole lot back into a TIME value from
a string that is built from the fields.  I'll see if I can get a parameter
to the function for specifying the precision in the next build.

--
Tim Young
Elevate Software
www.elevatesoft.com

Image