Formatting of Date and Date/Time Fields

When outputting to Word, PowerPoint, or PDF files, the merge fields with data type date or date/time can be formatted.

*This function is a feature of Office File Creator Ver.2.

 

Examples of Use

  • Output date fields in the format "Mar. 1, 2024".

 

 

Merge Fields Settings

Set up the merge field in the template file in the following format.

 

Merge Fields Format

{!Object API name.Field API Name, Format Pattern}

*Do not enclose the format pattern in double quotation "" or single quotation "''", but set it directly.

 

e.g. {!Case.TestDate__c, MMM. d, yyyy}

Output Result ・・・ Mar. 1, 2024

 

Format Pattern

Example: The object is Case, the field is TestDate__c (Date/Time), and the field value is 2024-03-01, 12:08:56.

Format Pattern Result Example of Merge Field
yyyy.M.d 2024.3.1 {!Case.TestDate__c, yyyy.M.d}
yyyy.MM.dd 2024.03.01 {!Case.TestDate__c, yyyy.MM.dd}
M, d, yyyy 3, 1, 2024 {!Case.TestDate__c, M, d, yyyy}
MMMMM, d, yyyy March, 1, 2024 {!Case.TestDate__c, MMMMM, d, yyyy}
EEE, MMM d, ''yy Fri, Mar 1, '24 {!Case.TestDate__c, EEE, MMM d, ''yy }
yyyyMMddHHmmss 20240301120856 {!Case.TestDate__c, yyyyMMddHHmmss}
h:mm a 12:08 PM {!Case.TestDate__c, h:mm a}

 

Memo

Java Date and Time Patterns

https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/text/SimpleDateFormat.html

 

 

Note

When outputting to Excel, it cannot be formatted the merge field. Format the cells in the template file.