date2Num Function [AX 2012]

Updated: November 21, 2009

Applies To: Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012

Converts a date to an integer that corresponds to the number of days since 1 January, 1900.


int date2Num(date _date)

Parameter

Description

_date

The date to convert.

The number of days between 1 January, 1900 and the specified date.

//Returns the value377.
date2Num(13\01\1901);

static void date2NumExample(Args _arg)
{
    date d = today();
    int i;
    ;
    i = date2Num(d);
    print i;
    pause;
}

Announcements: To see known issues and recent fixes, use Issue search in Microsoft Dynamics Lifecycle Services (LCS).

Community Additions

ADD
Show: