Date formatter display
The date field can be displayed, or formatted, several ways, some configurable in the date settings, others that are automatically provided as options.
You'll see these formatters as options on the 'Display fields' screen and when you add the fields to Views. You can also use these formatters in custom code by doing something like:
print content_format('field_date', $node->field_date[0], 'iso');
Formatter settings
In many places you can further control the way multiple value dates will be displayed with formatter settings. The formatter settings look like:
The number of values should be a numeric value, or blank to show all dates that match your other options. 'Starting from' and 'Ending on' can be a fixed dates in ISO format (like 2009-03-03T10:30:00) or relative times like 'now' or 'now +1 day'.
Formats and Format Types
Formatter options include:
- default
- The main way to display this date, configured in the Date settings, defaults to the site short format.
- short
- The site short format.
- medium
- The site medium format.
- long
- The site long format.
- time
- Display the date time only, using the time format in the default display.
- time_timezone
- Display the date time and timezone, using the time format in the default display.
- iso
- Display the date in the standard ISO format of YYYY-MM-DDTHH:MM:SS.
- ical
- Display the date in the standard iCal format of YYYYMMDDTHHMMSS.
- timestamp
- Display the date as the Unix timestamp value.
- format_interval
- Display the date as 'XX days, XX hours ago' or 'XX months, XX days from now'.
To set up custom formats and formatters, go to admin/settings/date-time/formats. You can either use a pre-configured display format, or create your own formatters and formats. Define a php date format string like 'm-d-Y H:i' (see http://php.net/date for more details on custom format strings.)