Click or drag to resize

PdfTextFieldDateFormat Property

Gets or sets a value representing the date format used if the form field is a date field.

Namespace:  RadPdf.Data.Document.Objects.FormFields
Assembly:  RadPdf (in RadPdf.dll) Version: 4.3.0.0 (4.3.0.0)
Syntax
public string DateFormat { get; set; }

Property Value

Type: String
Remarks

If set to a non-empty string, this form field is formatted to contain a date.

In some PDF tools, this field will show a date picker popup when clicked.

The date format is defined using alphabetic characters as tokens, each representing values for the following:

  • Day - either in a shortened version or fully spelled out

  • Month - either in a shortened version or fully spelled out

  • Year - two or four digits

Format token - DescriptionExample
d - The day of the month between 1 and 31."1" to "31"
dd - The day of the month with leading zero if required."01" to "31"
ddd - Abbreviated day name."Mon" to "Sun"
dddd - The full day name."Monday" to "Sunday"
m - The month of the year between 1-12."1" to "12"
mm - The month of the year with leading zero if required."01" to "12"
mmm - Abbreviated month name."Jan" to "Dec"
mmmm - The full month name."January" to "December"
yy - The year as a two-digit number."99" or "15"
yyyy - The full four digit year."1999" or "2015"

In addition to the date formatting tokens, there are seven separators that can be used to form a date expression that separates the several values of the date.

Character - DescriptionFormat example -> Final document rendering
, - Commamm,dd,yyyy -> 06,13,1997
. - Period / Dotmmm.dd yyyy -> Jun.13 1997
/ - Forward slashmm/dd/yyyy -> 06/13/1997
\\ - Double backslashmm\\dd\\yyyy -> 06\13\1997

(Note that the double backslash is used to format the date, but the printed value only contains one backslash.)

- - Dash / Hyphenmm-dd-yyyy -> 06-13-1997
: - Colonmm:dd:yyyy -> 06:13:2023
  - Spacedddd mmmm d yyyy -> Friday June 13 1997
See Also