Applies to Infiniti v8.0 or later
 
 

Overview
 
Document format allows data to be manipulated before it is inserted into a document, for example the number ‘155’ may appear in the document as ‘$155.00’ or the date ‘01/01/2020’ may appear as ‘Wednesday, 1 January 2020’.

Document formats are specified in the ‘Document Format’ field within the answer properties as shown below. Common document formats can be selected via the drop-down or keyed in manually.




 

The following tables outline the document formats available to be used in your templates to format answers. They are divided into five categories:  

  • Named date/time document formats
  • Custom date/time document formats
  • Named numeric document formats
  • Custom numeric document formats
  • Special document formats 

 

Named Date/Time Document Formats

Document Format
Description 
General Date, or G  
Displays a date and/or time. For real numbers, display a date and time; for example,
4/3/93 05:34 PM. If there is no fractional part, display only a date, for  example, 4/3/93. If there is no integer part, display time only, for example, 05:34 PM. Date display is determined by your system's LocaleID value.
 
Long Date, or D  
Displays a date according to your locale's long date format.
 
Short Date, or d  
Displays a date using your locale's short date format.
 
Long Time, or T  
Displays a time using your locale's long time format; includes hours, minutes, seconds.
 
Short Time, or t  
Displays a time using the 24-hour format, for example,
17:45.
 
f  
Displays the long date and short time according to your locale's format.
 
F  
Displays the long date and long time according to your locale's format.
 
g  
Displays the short date and short time according to your locale's format.
 
M, m  
Displays the month and the day of a date.
 
R, r  
Formats the date and time as Greenwich Mean Time (GMT)
 
s  
Formats the date and time as a sortable index.
 
u  
Formats the date and time as a GMT sortable index.
 
U  
Formats the date and time with the long date and long time as GMT.
 
Y, y  
Formats the date as the year and month.
 


Custom Date/Time Document Formats

 

Document Format
Description
[:]
Time separator. In some locales, other characters may be used to represent the time separator. The time separator separates hours, minutes, and seconds when time values are formatted. The actual character used as the time separator in formatted output is determined by your system's LocaleID value.
 
 
 
[/]
 
Date separator. In some locales, other characters may be used to represent the date separator. The date separator separates the day, month, and year when date values are formatted. The actual character used as the date separator in formatted output is determined by your locale.
 
 
 
[%]
 
Used to indicate that the following character should be read as a single-letter format without regard to any trailing letters. Also used to indicate that a single-letter format is read as a user-defined format. See below for further details
 
 
 
D
 
Displays the day as a number without a leading zero (for example,
1). Use %d if this is the only character in your user-defined numeric format.
 
 
dd
 
Displays the day as a number with a leading zero (for example,
01).
 
 
ddd
 
Displays the day as an abbreviation (for example,
Sun).
 

 

Related Articles

 

Keywords

dateformat