menu

UWP

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class PdfXfaTimePattern - UWP API Reference | Syncfusion

    Show / Hide Table of Contents

    Class PdfXfaTimePattern

    Represents the time patterns

    Inheritance
    System.Object
    PdfXfaTimePattern
    Namespace: Syncfusion.Pdf.Xfa
    Assembly: Syncfusion.Pdf.UWP.dll
    Syntax
    public sealed class PdfXfaTimePattern : Enum
    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(100, 30));
    //Set the format of the date time field.
    field.Format = PdfXfaDateTimeFormat.Time;
    //Set time pattern.
    field.TimePattern = PdfXfaTimePattern.Long;
    //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(100, 30))
    'Set the format of the date time field.
    field.Format = PdfXfaDateTimeFormat.Time
    //Set time pattern.
    field.TimePattern = PdfXfaTimePattern.Long
    '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()

    Fields

    Default

    default value (eg: 10:43:01 AM)

    Declaration
    public const PdfXfaTimePattern Default
    Field Value
    Type
    PdfXfaTimePattern

    Full

    full (eg: 10:43:01 AM GMT+05:30)

    Declaration
    public const PdfXfaTimePattern Full
    Field Value
    Type
    PdfXfaTimePattern

    H_MM_A

    eg:1:30 PM

    Declaration
    public const PdfXfaTimePattern H_MM_A
    Field Value
    Type
    PdfXfaTimePattern

    H_MM_SS

    eg:13:30:30

    Declaration
    public const PdfXfaTimePattern H_MM_SS
    Field Value
    Type
    PdfXfaTimePattern

    H_MM_SS_A

    eg:1:30:30 PM

    Declaration
    public const PdfXfaTimePattern H_MM_SS_A
    Field Value
    Type
    PdfXfaTimePattern

    H_MM_SS_A_Z

    eg:1:30:43 PM GMT+05:30

    Declaration
    public const PdfXfaTimePattern H_MM_SS_A_Z
    Field Value
    Type
    PdfXfaTimePattern

    HH_MM_SS

    eg:13:30:30

    Declaration
    public const PdfXfaTimePattern HH_MM_SS
    Field Value
    Type
    PdfXfaTimePattern

    HH_MM_SS_A

    eg:01:30:30 PM

    Declaration
    public const PdfXfaTimePattern HH_MM_SS_A
    Field Value
    Type
    PdfXfaTimePattern

    Long

    Long (eg: 10:43:01 AM GMT+05:30)

    Declaration
    public const PdfXfaTimePattern Long
    Field Value
    Type
    PdfXfaTimePattern

    Medium

    Medium (eg: 10:43:01 AM)

    Declaration
    public const PdfXfaTimePattern Medium
    Field Value
    Type
    PdfXfaTimePattern

    Short

    short(eg: 10:43 AM)

    Declaration
    public const PdfXfaTimePattern Short
    Field Value
    Type
    PdfXfaTimePattern

    Extension Methods

    DateTimeExtension.ToDateTime(Object)
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved