Dates and Times
Dates and Times are used throughout the platform, in Appointments, as Start/End Dates in Tasks, Expected Close Date, Estimated Start/End Date, Date Due, etc. T
These Date Formats are available in the platform:
- mm/dd/yyyy dd/mm/yyyy yyyy/dd/mm yyyy/mm/dd
- mm-dd-yyyy dd-mm-yyyy yyyy-dd-mm yyyy-mm-dd
- mm.dd.yyyy dd.mm.yyyy yyyy.dd.mm yyyy.mm.dd
- mm is "Month", dd is "Day", yyyy is Year
- and delimters are:
- (/) slash, or stroke
- (-) dash, or hyphen
- (.) period, dot, or full stop
Users can choose a 12-hour clock with AM/PM, or a 24-hour clock.
Using a 12-hour format, '10:00 AM' is created with this syntax:
Format Type Examples
3:30 AM, 3:30 PM
Format of DateTime Fields
The format for a DateTime field is the combination of the user's localized date and time, separated by a space.
Date/Time Strings and Formula Functions
Date/Time strings are used as arguments in many of the Date and Time Formula Functions, and can also be returned as the result from those functions.
- '03/27/2009 10:15 am'
'20.04.2009 10:45 pm'
Date/Time strings are composed of these elements:
Element Syntax Description year yyyy A text string depicting the year (1900 - 9999) month mm A text string depicting the month (1-12, beginning with January) day dd A text string depicting the day of the month (1-31, depending on the number of days in the month) hour hh A text string depicting the hour in the format (0-12 for a 12-hour clock, or 0-24 for a 24-hour clock) minute mm A text string depicting the minute in the format (0-59) part of day am
A text string the identifies the part of day for a 12-hour clock.
For more information, see http://en.wikipedia.org/wiki/12-hour_clock
- Learn more: Date and Time Formula Functions
Expression Result DATESUB('06/13/2009', 2, 'MONTH') = '04/13/2009' DATESUB(end_date, MONTH(start_date), 'MONTH') = '04/23/2009' DATESUB(end_date, start_date) = 140 (days) MONTH(end_date) - MONTH(start_date) = 4 (months)
- end_date = '06/23/2009'
- start_date = '02/03/2009' and MONTH(start_date) = 2
Long Date Format
Resources in APIs that apply Date or DateTime values use a Long Date Format, which is different from theMM-DD-YYYY date patterns described in the UI.
Long Date Format is based on the Java class Date, which is defined as the number of milliseconds since January 1, 1970, 00:00:00 GMT.
This Long Date Format encodes dates and times as a number, which can then be applied to complex filters and formulas in the AgileApps Cloud platform.