any2Date Function

Converts the object parameter to its equivalent date. The object parameter can be of (almost) any data type, but useful output is obtained when object is of type real, int, date, or str. Inappropriate content generates a run-time error.


date any2Date(anytype object)

Parameter

Description

object

The value to convert to a date.

A date.

static void any2DateExample(Args _args)
{
    date d;
 
    date convert(anytype _value)
    {
        if (typeof(_value) == Types::Date)
        {
            return any2Date(_value);
        }
    }
    ;
 
    d = convert(today());
    print strfmt("The date value is %1", d);
    pause;
}

Community Additions

ADD
Show: