Reformats a date/time to the default date format and strips out the time.

Database-formatted dates cannot be evaluated (for example, 2000-02-02).

Long-formatted dates cannot be evaluated (for example, June 12, 2001).

Type and Usage


The only parameter is a string that specifies a date/time.


  • Returns the date only in the format used by dateCurrent (for example, 7/12/00).

  • Returns null if the parameter cannot be evaluated.


Returns the current date only (for example, 9/12/01):


Returns the date ten days in the future (for example, 9/22/01):


Formats the date and time and displays the date only as 1/17/00:

<$formatDateOnly("01/17/2000 2:00 PM")$>

This script displays the current date and a date 100 days in the future. Line one assigns the current date only to a custom variable. Line two assigns a date 100 days in the future to a second custom variable. Line three displays these dates to a user (for example, Start Date: 10/12/01 and End Date: 1/20/02):

<$my_startDate = formatDateOnly(dateCurrent())$>
<$my_endDate = formatDateOnly(dateCurrent(100))$>
Start Date: <$my_startDate$> and End Date: <$my_endDate$>