Показать сообщение отдельно
Старый 06.09.2007, 06:22   #1  
gb is offline
gb
Участник
 
42 / 15 (1) ++
Регистрация: 31.03.2005
new behavior of str2Date() in AX 4.
Hello everybody,

I am wondering if anybody noticed this. Try to run the below job in AX 3 and then AX 4:

static void tst_Str2Date(Args _args)
{
str strDate;
date dte;
;

strDate = "2007-09-05T00:00:00-05:00";
dte = str2date(strDate,321);
info(strDate);
info(date2str(dte,213,2,3,2,3,4));

}

I know that normally that function used this way: str2date("24.12.89",123)

However, in AX 3 my example works fine, but in AX 4 str2Date() returns empty date.

I guess I can just create a new global function and move forward, but it seems pretty strange that the standard function is not working.

I will appreciate any comments.
Thanks,
gb

I tested it in AX 4 SP1.