Trending: Jawaan


Dynamics AX Date Time Conversion


Question:

How can one convert an XML-style date/time string (e.g., 2008-04-16T16:03:02.000-05:00) to X++ date and time values? ... In Dynamics AX 4

Answer:

Using System.DateTime object.

static void dateTimeTest(Args _args)

{

System.DateTime netDateTime;

Date myDate;

;

netDateTime = System.DateTime::Parse("2008-04-16T16:03:02.000-05:00");

mydate = netDateTime.get_Date();

info(date2str(myDate,-1,-1,-1,-1,-1,-1));

}

http://www.dynamic-ax.co.uk/


View the original article here

0 Responses to “Dynamics AX Date Time Conversion”

About Me