Question:
When I create a Bookmark Template, how can I specify the format for the date fields?
Answer:
Using a prefix with your bookmark will specify the format for your data. Below are some examples:
| Bookmark | Result in Document Template |
| DocHeader_Due | Wednesday, July 6, 2005 5:00 pm |
| FS_DocHeader_Due | 7/6/2005 5:00 pm |
| Fd_DocHeader_Due | 7/6/2005 |
| FD_DocHeader_Due | Wednesday, July 6, 2005 |
| FG_DocHeader_Due | 7/6/2005 5:00 PM |
| FM_DocHeader_Due | July 06 |
| FY_DocHeader_Due | July 2005 |
Spitfire will even support custom date formats. Below are the custom characters we support:
| Format Pattern | Description |
| b………………………..
c……………………….. |
blank
, (comma) |
| X……………………….. | The default time separator |
| x (lower case)………… | The default date separator |
| Date Formats: | |
| d……………………….. | The day of the month. Single-digit days will not have a leading zero. |
| dd……………………… | The day of the month. Single-digit days will have a leading zero. |
| ddd…………………….. | The abbreviated name of the day of the week. |
| dddd…………………… | The full name of the day of the week. |
| M………………………. | The numeric month. Single-digit months will not have a leading zero. |
| MM…………………….. | The numeric month. Single-digit months will have a leading zero. |
| MMM…………………… | The abbreviated name of the month. |
| MMMM…………………. | The full name of the month. |
| yy……………………… | The year without the century. If the year without the century is less than 10, the year is displayed with a leading zero. |
| yyyy…………………… | The year in four digits, including the century. |
| Time Formats: | |
| h……………………….. | The hour in a 12-hour clock. Single-digit hours will not have a leading zero. |
| hh……………………… | The hour in a 12-hour clock. Single-digit hours will have a leading zero. |
| H……………………….. | The hour in a 24-hour clock. Single-digit hours will not have a leading zero. |
| HH……………………… | The hour in a 24-hour clock. Single-digit hours will have a leading zero. |
| m………………………. | The minute. Single-digit minutes will not have a leading zero. |
| mm…………………….. | The minute. Single-digit minutes will have a leading zero. |
| t……………………….. | The first character in the AM/PM designator. |
| tt………………………. | The AM/PM designator. |
To use a custom format, add it to your bookmark prefix. For example:
FddxMMxyy_DocHeader_Due would print 07/06/05
FddxMMxyyyybhhXmmbtt_DocHeader_Due would print 07/06/2005 05:00 PM
Additional Comments:
See also KBA-01132. For more information about this and other bookmark names, see the Focus on Bookmark Templates guide.
KBA-01131; Last updated: October 12, 2016 at 11:28 am;
Keywords: bookmarks, Doc Template, bookmarks
