Date Formatting
DataSplice gives you the ability to format dates and numbers for particular fields in your views as you see fit. These formatting options are entered for the corresponding field in the field settings and permissions section of the view in question.
Formatting Date and Time
The following is a table that represents the different formatting options that can be set for date and time fields.
| Code | Value |
|---|---|
| <empty> | Use the system default format |
| date | Display only the date using the current local settings |
| time | Display only the time using the current local settings |
| yy | Last two digits of year |
| yyyy | Full year |
| M | One or two digit month |
| MM | Two digit month (single digits are preceded by 0) |
| MMM | Three character month abbreviation |
| MMMM | Full month name |
| d | One or two digit day |
| dd | Two digit day (single digits are preceded by 0) |
| ddd | Three character weekday abbreviation |
| dddd | Full weekday name |
| h | One or two digit hour in 12-hour format |
| hh | Two digit hour in 12-hour format |
| H | One or two digit hour in 24-hour format |
| HH | Two digit hour in 24-hour format |
| m | One or two digit minute |
| mm | Two digit minute (single digits are preceded by 0) |
| s | One or two digit second |
| ss | Two digit second (single digits are preceded by 0) |
| t | A or P |
| tt | AM or PM |
For example, if you want the date format to be 09/02/05, you would enter MM/DD/YY in the Date Format field. For a date format of September 2, 2005 - 1:26:32, you would enter MMMM D, YYYY - h:mm:ss.
Formatting Numbers
Formatting principles can also be applied to decimal number by setting the Decimal Precision field. To format a decimal number, place an integer value in the Decimal Precision field. This number refers to the number of places of decimal precision to be displayed. For example, to display zero decimal places, enter 0 in this field. To display one decimal place, enter 1. This number can be set for any number of decimal places, as desired.
Last modified 2006-09-08 04:37 PM