AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX: За рубежом > DAX in English
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 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.
Старый 06.09.2007, 10:05   #2  
kashperuk is offline
kashperuk
Участник
Аватар для kashperuk
MCBMSS
Соотечественники
Сотрудники Microsoft Dynamics
Лучший по профессии 2017
Лучший по профессии 2015
Лучший по профессии 2014
Лучший по профессии 2011
Лучший по профессии 2009
 
4,361 / 2084 (78) +++++++++
Регистрация: 30.05.2004
Адрес: Atlanta, GA, USA
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
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
Dynamics AX: Managing Your Supply Chain Using Microsoft Dynamics AX 2009 - Book Review Blog bot DAX Blogs 0 31.03.2009 23:06
axStart: Microsoft Dynamics AX 2009 Hot Topics Web Seminar Series Blog bot DAX Blogs 0 06.08.2008 12:05
Arijit Basu: AX 2009 - Quick Overview Blog bot DAX Blogs 4 19.05.2008 14:47
Arijit Basu: Reporting & BI in AX: An Overview [Level 100] Blog bot DAX Blogs 0 07.01.2008 16:01
Inside Dynamics AX 4.0: Usage Scenarios Blog bot DAX Blogs 0 04.10.2007 05:15

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 21:12.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.