Subject | expressing time as a numeric vale in dialect 3 |
---|---|
Author | Peter |
Post date | 2005-06-08T14:40:07Z |
Hi
I have a trigger on an insert on a table and I'm trying to set a time field in dialect 3 to
a calculated value. (basically spaced at 1 min intervals from midnight to 7 am, then
back to midnight as id wraps around by using modulus)
If I use
new.contact_time = '00:00:01' it works
if I use
new.contact_time = new.id * (1.000/1440)
it compiles but fails when inserting records as I think it wants a string ?
I know time is stored as a 32 bit integer and I want to set it at this level with an
integer modulus calculation.
Any ideas how I can set this field by calculation ?
Peter
--
=================================================
Peter Chaisty FInstBE e-Mail: peter@...
-------------------------------------------------
Cyionics Ltd UK
Tel: +44(0)1495 785570
All email is scanned using Norton Antivirus
=================================================
I have a trigger on an insert on a table and I'm trying to set a time field in dialect 3 to
a calculated value. (basically spaced at 1 min intervals from midnight to 7 am, then
back to midnight as id wraps around by using modulus)
If I use
new.contact_time = '00:00:01' it works
if I use
new.contact_time = new.id * (1.000/1440)
it compiles but fails when inserting records as I think it wants a string ?
I know time is stored as a 32 bit integer and I want to set it at this level with an
integer modulus calculation.
Any ideas how I can set this field by calculation ?
Peter
--
=================================================
Peter Chaisty FInstBE e-Mail: peter@...
-------------------------------------------------
Cyionics Ltd UK
Tel: +44(0)1495 785570
All email is scanned using Norton Antivirus
=================================================