Documentation

Looking for something in particular?

DateFormat

This function converts a date into a specific format. Refer to SimpleDateFormat for more information on available date formats.

Format: DateFormat(date,output format,timezone)

Examples:

{DateFormat()}– Defaults to system date in the format yyyy-MM-dd, e.g. 2015-01-16

{DateFormat(TODAY,"MM-dd-YYYY")}– Modify date format to be month-first, e.g. 01-16-2015

{DateFormat(DateAdd(TODAY,5),"MM-dd-YYYY")}– Use with other functions, e.g. 01-21-2015

{DateFormat(NOW,"MM-dd-YYYY hh a zzzz","GMT")}– Including a timezone, e.g. 01-16-2015 10 AM Greenwich Mean Time

Practice


Want to learn more about using this function in Automation? You can use the following sample test case to get started. Simply right-click to download DateFormat.testcase and then drag and drop the test case into the test folder within the Navigator panel of Automation.

Note: Unzip/extract the compressed file before using it in Automation.

Review Provar on G2
Documentation library

Trying to raise a case with our support team?

We use cookies to better understand how our website is used so we can tailor content for you. For more information about the different cookies we use please take a look at our Privacy Policy.

Scroll to Top