Dynamics AX Date Time Conversion
Do you like this story?
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/
This post was written by: Rahil Anouar
Rahil Anouar is a professional blogger, web designer and Linux user. Follow him on Twitter
Subscribe to:
Post Comments (Atom)
0 Responses to “Dynamics AX Date Time Conversion”
Post a Comment