New
Uniied datetime type in dynamics ax 5.0 good afternoon,
Anyone that has experience with SQL has noticed that Dax versions prior
5.0 handle date and time differently from SQL. Whereas SQL uses a single Field
To hold both date and time, Dax uses separate datatypes and fields for the two.
That is no longer the case in version 5.0x as a new utcdatetime datatype has
Been introduced. Microsoft has also renamed all timestamp fields to Del _ * (such
As createddate and createtime) and added corresponding uniied fields (such
Createddatetime ).
Note that the original datatypes date and time are still available for use
When only a time or a date is needed.
Here's a quick job as example of tools available on the new datatype:
Static void utcdatetimeexamples (ARGs _ ARGs)
{
Utcdatetime
Utcdatetimenow = datetimeutil: getsystemdatetime ();
;
Info (strfmt ("% 1", utcdatetimenow ));
Info (strfmt ("% 1 ",
Datetimeutil: Date (utcdatetimenow )));
Info (strfmt ("% 1 ",
Datetimeutil: Time (utcdatetimenow )));
Info (strfmt ("% 1 ",
Datetimeutil: applytimezoneoffset (utcdatetimenow, datetimeutil: getuserpreferredtimezone ())));
Info (strfmt ("% 1", datetimeutil: utcnow ()));
}