New uniied datetime type in dynamics ax 5.0

Source: Internet
Author: User

 

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 ()));
}

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.