Table Of Contents

Format Date and Time String (G Dataflow)

Version:
    Last Modified: March 15, 2017

    Converts a timestamp or numeric value into a string that displays the corresponding time.

    This node calculates date and time string by copying time format string and replacing each of the time format codes with the corresponding values.

    connector_pane_image
    datatype_icon

    time format string

    Format of the output string.

    The syntax for this string is %<optional #><format code>.

    The # modifier removes the leading zeros from the output of %d, %H, %I, %j, %m, %M, %S, %U, %w, %W, %X, %y, %Y. By default, the output contains leading zeros as necessary to ensure a constant field width.

    This node uses the following format codes to interpret timestamp:

    Time Format Code Definition Values
    %a abbreviated weekday name. This node returns a numeric value for systems that do not support abbreviated names, such as Chinese and Korean. Sun - Sat
    %A full weekday name Sunday - Saturday
    %b abbreviated month name. This node returns a numeric value for systems that do not support abbreviated names, such as Chinese and Korean. Jan - Dec
    %B full month name January - December
    %c locale-specific default date and time  
    %d day of month 01-31
    %H hour (24-hour clock) 00-23
    %I hour (12-hour clock) 01-12
    %j day number of the year 001-366
    %m month number 01-12
    %M minute 00-59
    %p AM or PM flag AM or PM
    %S second 00-59
    %<digit>u fractional seconds with <digit> precision  
    %U week number of the year, with the first Sunday as the first day of the first week 00-53
    %w weekday as a decimal number, with 0 representing Sunday 0-6
    %W week number of the year, with the first Sunday as the first day of the first week 00-53
    %x locale-specific date  
    %.1x long date format  
    %.2x abbreviated long date format. This node returns a numeric value for systems that do not support abbreviated names, such as Chinese and Korean.  
    %X locale-specific time  
    %y year within century 00-99
    %Y year, including the century 1997, for example
    %z difference between locale time and universal time HH:MM:SS
    %Z time zone name or abbreviation  
    Literal text Literal text  

    Default: %c—Corresponds to the locale-specific date/time representation.

    datatype_icon

    timestamp

    The time that you want to convert.

    The year in this timestamp must be between 1600 and 3000.

    If you wire a numeric value to this input, the node interprets the number as the time-zone-independent number of seconds that have elapsed since 12:00 a.m. on January 1, 1904, Universal Time [01-01-1904 00:00:00]. The node interprets a negative number as the number of seconds before this time.

    Default: The current date and time

    datatype_icon

    UTC format

    Boolean value that specifies whether the output string is in Universal Time or in the configured time zone for the computer.

    True date and time string is in Universal Time.
    False date and time string is in the configured time zone for the computer.

    Default: False

    datatype_icon

    date and time string

    timestamp formatted by the code specified in time format string.

    Where This Node Can Run:

    Desktop OS: Windows

    FPGA: This product does not support FPGA devices


    Recently Viewed Topics