str2Date Function in AX

This function is used to convert the specified string to a date value. There is 2 parameters in this function :

  1. _text : The string to convert to a date value.
  2. _sequence : A three digit integer that describes the positions of the day, month, and year in the string to convert (day = 1, month = 2, year = 3). For example, if we want to use year, month, day, we must write 321.

Example :

static void str2DateExample(Args _arg)
    date d;
    d = str2Date("22/2/2017", 123);
    info(strfmt("%1", d));

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Create a website or blog at

Up ↑

%d bloggers like this: