Contents
Display Legacy Contents

 Print
    DateToString  
This Function returns a <string>, which is the specified Date formatted with the specified Format.

Parameters

Date string
Date to be converted to the specified Format.
This parameter must be in format YYYYMMDD.


Format string
Choose one of the predefined options or combine YYYY, YY, MM, and DD
Where:
  • YYYY - 4 digits year.
  • YY – 2 digits year.
  • MM – Month.
  • DD – Day.


     
Example 1
  Example 2
  Example 3
DateToString("20120131", "YYYY-MM-DD")

Result 2012-01-31
  DateToString("20120101", "MM-YYYY-DD")

Result = 31-2012-01
  DateToString("20120101", "DD-MM-YYYY")

Result = 31-01-2012
         
Example 4   Example 5    
DateToString("20120131", "YYYY/MM/DD")

Result 2012/01/31
  DateToString("20120131", "YY/MM/DD")

Result = 12/01/31
   

See also
Samples

 
Updated: 3/28/2018 10:18 AM