docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class DateTimeConverter

    UXML attribute converter for DateTime values, used by DateTimeField.

    Inheritance
    object
    UxmlAttributeConverter<DateTime>
    DateTimeConverter
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.AppUI.Editor
    Assembly: Unity.AppUI.Editor.dll
    Syntax
    public class DateTimeConverter : UxmlAttributeConverter<DateTime>

    Methods

    FromString(string)

    Converts a UXML attribute value into a DateTime.

    Declaration
    public override DateTime FromString(string value)
    Parameters
    Type Name Description
    string value

    The attribute value to convert.

    Returns
    Type Description
    DateTime

    The converted date and time, or the default value if it is empty or cannot be parsed.

    Overrides
    UxmlAttributeConverter<DateTime>.FromString(string)

    ToString(DateTime)

    Converts a DateTime into its UXML attribute representation.

    Declaration
    public override string ToString(DateTime value)
    Parameters
    Type Name Description
    DateTime value

    The date and time to convert.

    Returns
    Type Description
    string

    The date and time formatted using the invariant culture round-trip format.

    Overrides
    UxmlAttributeConverter<DateTime>.ToString(DateTime)
    In This Article
    Back to top
    Copyright © 2026 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)