date

The date function converts a string type into a datetime type using a format that you specify. This function enables you to include static characters such as a slash (/), which gives you access to full date support.

Syntax

Use this syntax:



Datetime = date("format",string);
where:      datetime   =   datetime variable (month specified as 1-12)
      format   =   date format
      string   =   string variable

Example

An example of this function follows:



datetime d;
d = date(1995,4,6);
d = date(1995,4,6,12,0);
d = date("%y/%m/%d","95/4/6");
d = date("%y/%m/%d",#strdate);