Copyright © 2016 Mobilengine Corp. All rights reserved. version: 7.0.4.19927
Declares a date in the database as a dtu
value.
Remarks
The method does not perform time zone conversion on the database date value - if the
dtdb
was originally a local date value,
dtdb.DeclareAsDtu()
will throw an error message at runtime.
The dtu.DtuToDtdb()
method removes the milliseconds part of the
dtu
value during conversion, and so a dtu
value, and the
same dtu
value first converted to dtdb
and then declared as
a dtu
using the dtdb.DeclareAsDtu()
method are not strictly
equal.
Sample
var a = dtu.Now(); var b = a.DtuToDtdb(); ... var e =b.DeclareAsDtu()
; var f = (e == a); // returns false trace e; trace a; trace f; /* the DeclareAs... methods do no actual data type conversion this would fail with the 'Cannot declare local time as Dtu' error at runtime var i = c.DtlToDtdb().DeclareAsDtu(); trace i; */