Optimize str2date function
The job can be any string date format convert to AX date format.
so that, Do not need to specify string date format, such as 123,132,321
static void FAN_DateTimeNET(Args _args) { name name; transDate dt; transdate getTransDate(name _dateStr) { System.DateTime netDatetime; transdate ret; utcdateTime utcDate; ; new InteropPermission(InteropKind::ClrInterop).assert(); utcDate = System.DateTime::Parse(_dateStr); netDatetime = System.DateTime::Parse(_dateStr); ret = datetimeUtil::date(utcDate); info(netDatetime.ToLongDateString());//2013/8月/6日 CodeAccessPermission::revertAssert(); return ret; } ; name = "6/Aug/2013"; dt = getTransDate(name); info(strfmt("%1", dt));//2013/8/6 dt = str2date(name, 321); info(strfmt("%1", dt));//空 }