Function
- date any2Date (anytype object)
Parameters
- Parameter: object
- Description: The value to convert to a date.
Return Value
- A date value.
Example
- X++
static void any2DateExample(Args _args)
{
date myDate;
str s;
int i;
;
s = "2010 6 17"; // A string object, of yyyy mm dd.
myDate = any2Date(s);
Global::info(strFmt("%1 is output, from input of \"2010 6 17\"", myDate));
i = 40361; // An int object, which represents the number of days from 1900/01/01.
myDate = any2Date(i);
Global::info(strFmt("%1 is output, from input of 40361", myDate));
}
/**** Infolog display.
Message (04:44:15 pm)
6/17/2010 is output, from input of "2010 6 17"
7/4/2010 is output, from input of 40361
****/
My above blog is based on Microsoft's Official information.
I hope this blog about 'Microsoft Dynamics AX 2012 R2 - any2Date Function' was informative. Please feel free to leave your comments.
No comments:
Post a Comment