Knowledge Base

Custom Date Formats

You can specify custom date formats in invoice/estimate/statement/report templates. The formats are part of NSCalendarDate (see Apple's Cocoa Foundation framework documentation for more details). The following is a list of specifiers:

a '%' character
abbreviated weekday name
full weekday name
abbreviated month name
full month name
shorthand for %X %x, the locale format for date and time
day of the month as a decimal number (01-31)
same as %d but does not print the leading 0 for days 1 through 9
milliseconds as a decimal number (000-999)
hour based on a 24-hour clock as a decimal number (00-23)
hour based on a 12-hour clock as a decimal number (01-12)
day of the year as a decimal number (001-366)
month as a decimal number (01-12)
minute as a decimal number (00-59)
AM/PM designation for the locale
second as a decimal number (00-59)
weekday as a decimal number (0-6), where Sunday is 0
date using the date representation for the locale
time using the time representation for the locale
year without century (00-99)
year with century (such as 1990)
time zone name (such as Pacific Daylight Time)
time zone offset in hours and minutes from GMT (HHMM)

So, if you'd like to specify a custom format instead of using one our canned formats, you enter it as follows: "%Y-%m-%d". That will give you an output that looks like "2008-09-21".


Was this answer helpful?

Print this Article Print this Article

Also Read

Powered by WHMCompleteSolution