Article ID: 947373 - View products that this article applies to.
This article has been archived. It is offered "as is" and will no longer be updated.
Source: Microsoft Support
RAPID PUBLISHINGRAPID PUBLISHING ARTICLES PROVIDE INFORMATION DIRECTLY FROM WITHIN THE MICROSOFT SUPPORT ORGANIZATION. THE INFORMATION THAT IS CONTAINED HEREIN IS CREATED IN RESPONSE TO EMERGING OR UNIQUE TOPICS, OR IS INTENDED TO SUPPLEMENT OTHER KNOWLEDGE BASE INFORMATION.
This article describes how to convert a string that does not have one of the following formats to a native date in Microsoft Dynamics AX 4.0:
Microsoft Dynamics AX 4.0 provides conversion functions to convert a string to a date. However, the string must have one of the following formats:
However, you can use the Microsoft Dynamics AX 4.0 string functions to convert the string to a native date. To do this, retrieve the month, the day of the month and the year from the string, concatenate them to a string in the format that Microsoft Dynamics AX 4.0 can handle, and then convert the concatenated string to a native date. The following code is an example about how to use the Microsoft Dynamics AX 4.0 string functions to convert a string to a native date.
Note The code assumes that the following conditions are true:
DISCLAIMERMICROSOFT AND/OR ITS SUPPLIERS MAKE NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY, THE RELIABILITY OR THE ACCURACY OF THE INFORMATION THAT IS CONTAINED IN THE DOCUMENTS AND THE RELATED GRAPHICS PUBLISHED ON THIS WEB SITE (THE “MATERIALS”) FOR ANY PURPOSE.
THE MATERIALS MAY INCLUDE TECHNICAL INACCURACIES OR TYPOGRAPHICAL ERRORS AND MAY BE REVISED AT ANY TIME WITHOUT NOTICE. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, MICROSOFT AND/OR ITS SUPPLIERS DISCLAIM AND EXCLUDE ALL REPRESENTATIONS, WARRANTIES, AND CONDITIONS WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO REPRESENTATIONS, WARRANTIES, OR CONDITIONS OF TITLE, NON-INFRINGEMENT, SATISFACTORY CONDITION OR QUALITY, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, WITH RESPECT TO THE MATERIALS.