Back to Devexpress

DATE

officefileapi-15290-word-processing-document-api-fields-field-codes-date.md

latest954 B
Original Source

DATE

  • Sep 19, 2023

Non-MailMerge field

{ DATE [@ “format“ [* MERGEFORMAT]] }

Inserts the current date and time. The optional format parameter specifies the date format string other than the default system. The * MERGEFORMAT switch retains formatting applied to the field.

If you omit the format parameter, default formatting depends on the language assigned to the field range (the CharacterPropertiesBase.Language property value). The default format is “M/d/yyyy”. If you set the FieldOptions.UseCurrentCultureDateTimeFormat option to true , the system’s Date and Time settings will be used by default.

Field CodesField Results
DATE4/18/2011
DATE @ “dddd, MMMM dd, yyyy HH:mm:ss”Monday, April 18, 2011 11:25:26