Friday 26 October 2012

Date Conversion to string in Ax 2012

Hi Friends,

Today we will have a look at the date values and its conversion to string values in Ax 2012.

For Eg: We have a variable called Date d

We have assigned a value to it d = 20/07/1988



str Date2StrEasyLocal(date _date)
{
return ( date2Str
(_date,
321, // YMD
DateDay::Digits2,
DateSeparator::Hyphen,
DateMonth::Digits2,
DateSeparator::Hyphen,
DateYear::Digits4) );
}


str s = Date2StrEasyLocal(d);

By the above way we can covert the dates in string values.

Vivek Chirumamilla

No comments:

Post a Comment