Enum PdfXfaDatePattern
Specifies the date pattern.
Namespace: Syncfusion.Pdf.Xfa
Assembly: Syncfusion.Pdf.Base.dll
Syntax
public enum PdfXfaDatePattern
Examples
//Create a new XFA document
PdfXfaDocument document = new PdfXfaDocument();
//Create a new XFA form
PdfXfaForm form = new PdfXfaForm(PdfXfaFlowDirection.Horizontal, 595);
//Create a new XFA Field
PdfXfaDateTimeField field = new PdfXfaDateTimeField("dateTime1", new SizeF(200, 30));
//Set the format of the date time field.
field.Format = PdfXfaDateTimeFormat.Date;
//Set date pattern.
field.DatePattern = PdfXfaDatePattern.Full;
//Set the default value
field.Value = DateTime.Now;
//Add the field to the form
form.Fields.Add(field);
document.XfaForm = form;
//Save the document
document.Save("output.pdf", PdfXfaType.Dynamic);
//Close the document
document.Close();
'Create a new XFA document
Dim document As New PdfXfaDocument()
'Create a new XFA form
Dim form As New PdfXfaForm(PdfXfaFlowDirection.Horizontal, 595)
'Create a new XFA Field
Dim field As New PdfXfaDateTimeField("dateTime1", New SizeF(200, 30))
'Set the default value
field.Value = DateTime.Now
'Set the format of the date time field.
field.Format = PdfXfaDateTimeFormat.Date
'Set date pattern.
field.DatePattern = PdfXfaDatePattern.Full
'Add the field to the form
form.Fields.Add(field)
document.XfaForm = form
'Save the document
document.Save("output.pdf", PdfXfaType.Dynamic)
'Close the document
document.Close()
Fields
Name | Description |
---|---|
DDMMMMYYYY | 13 November, 2015. |
DDMMMYY | 13-Nov-15. |
DDMMYYYY | 30/10/2015 |
Default | Appears the Default value eg: Nov 13, 2015 |
EEEE_MMMMD_YYYY | Friday, November 13, 2015. |
EEEEDDMMMMYYYY | Friday, 13 November, 2015. |
EEEEMMMMDDYYYY | Friday, November 13, 2015 |
Full | Thursday, November 12, 2015. |
Long | November 13,2015. |
MDYY | 11/13/15. |
MDYYYY | 11/13/2015. |
Medium | eg: Nov 13, 2015. |
MMDDYY | 11/13/15. |
MMDDYYYY | 11/13/2015. |
MMMD_YYYY | Nov 13,2015. |
MMMMD_YYYY | November 13,2015. |
MMMMDDYYYY | November 13,15. |
MMMMYYYY | November 2015. |
Short | eg:11/13/2015. |
YYMMDD | 15/11/13. |
YYYYMMDD | 2015-11-13. |