06.09.2007, 06:22 | #1 |
Участник
|
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. |
|
06.09.2007, 10:05 | #2 |
Участник
|
Maybe this is because they are planning to add the DateTime type to DAX in future versions.
and it will have its own functions for conversion. so they are changing the existing ones to do exactly what they should. and you would have to agree, that 2007-09-05T00:00:00-05:00 is not exactly a date |
|
|
|