Customize Your Date-Time Format

To use format pattern to change the date-time format for date-time calculation, do the procedure in this topic.

How to Start

  1. On the App Explorer screen, do one of these:
  2. Do one of these:
    • Add an activity:
      1. In Process Builder, in the Activity Library, open the Utilities tab.

        Open Utilities tab
      2. On the Utilities tab, drag one of these activities activity onto your process:
        • Add Date Time Add Date Time icon
        • Subtract Date Time Subtract Date Time icon
        • Convert Date Format Convert Date Format icon
        • Calculate Date Difference Calculate Date Difference icon
    • Change an activity:
      1. In your process, double-click your activity.
  3. On the configuration screen, go to a page where you can specify a date-time calculation.

Procedure

  1. On the date-time configuration page, click the date-time format list to enter your custom format. This table shows the format pattern options.
    Formatting PatternDefinition

    d, %d

    The day of the month. 1-digit days do not have a leading zero (0). The application specifies %d if the format pattern is not used with other format patterns.

    dd

    The day of the month. 1-digit days have a leading zero (0).

    ddd

    The abbreviated word for the day of the week. Abbreviations are specified in the AbbreviatedDayNames process data variable.

    dddd

    The full name of the day of the week. Day names are specified in the DayNames process data variable.

    f, %f

    The fraction of a second in 1-digit precision. The remaining digits are truncated. The application specifies %f if the format pattern is not used with other format patterns.

    ff

    The fraction of a second in 2-digit precision. The remaining digits are truncated.

    fff

    The fraction of a second in 3-digit precision. The remaining digits are truncated.

    ffff

    The fraction of a second in 4-digit precision. The remaining digits are truncated.

    fffff

    The fraction of a second in 5-digit precision. The remaining digits are truncated.

    ffffff

    The fraction of a second in 6-digit precision. The remaining digits are truncated.

    fffffff

    The fraction of a second in 7-digit precision. The remaining digits are truncated.

    F, %F

    Shows the most significant digit of the seconds fraction. Nothing shows if the digit is zero (0). The application specifies %F if the format pattern is not used with other format patterns.

    FF

    Shows the 2 most significant digits of the seconds fraction. However, trailing zeros (0), or 2 zero (0) digits, are not displayed.

    FFF

    Shows the 3 most significant digits of the seconds fraction. However, trailing zeros (0), or 3 zero (0) digits, are not displayed.

    FFFF

    Shows the 4 most significant digits of the seconds fraction. However, trailing zeros (0), or 4 zero (0) digits, are not displayed.

    FFFFF

    Shows the 5 most significant digits of the seconds fraction. However, trailing zeros (0), or 5 zero (0) digits, are not displayed.

    FFFFFF

    Shows the 6 most significant digits of the seconds fraction. However, trailing zeros (0), or 6 zero (0) digits, are not displayed.

    FFFFFFF

    Shows the 7 most significant digits of the seconds fraction. However, trailing zeros (0), or 7 zero (0) digits, are not displayed.

    gg

    The period or era. This pattern is ignored if the date to be formatted does not have an associated period or era string.

    h, %h

    The hour in a 12-hour clock. 1-digit hours do not have a leading zero (0). The application specifies %h if the format pattern is not used with other format patterns.

    hh

    The hour in a 12-hour clock. 1-digit hours have a leading zero (0).

    H, %H

    The hour in a 24-hour clock. 1-digit hours do not have a leading zero (0). The application specifies %H if the format pattern is not used with other format patterns.

    HH

    The hour in a 24-hour clock. 1-digit hours have a leading zero (0).

    K

    Different values of the Kind property, that is, Local, Utc, or Unspecified.

    m, %m

    The minute. 1-digit minutes do not have a leading zero (0). The application specifies %m if the format pattern is not used with other format patterns.

    mm

    The minute. 1-digit minutes have a leading zero (0).

    M, %M

    The numeric month. 1-digit months do not have a leading zero (0). The application specifies %M if the format pattern is not used with other format patterns.

    MM

    The numeric month. 1-digit months have a leading zero (0).

    MMM

    The abbreviated name of the month, as specified in the AbbreviatedMonthNames process data variable.

    MMMM

    The full name of the month, as specified in the MonthNames process data variable.

    s, %s

    The second. 1-digit seconds do not have a leading zero (0). The application specifies %s if the format pattern is not used with other format patterns.

    ss

    The second. 1-digit seconds have a leading zero (0).

    t, %t

    The first character in the AM/PM designator specified in the AMDesignator or PMDesignator process data variable. The application specifies %t if the format pattern is not used with other format patterns.

    tt

    The AM/PM designator specified in the AMDesignator or PMDesignator process data variable. Your application should use this format pattern for languages for which it is necessary to maintain the distinction between AM and PM. An example is Japanese, for which the AM and PM designators differ in the second character instead of the first character.

    y, %y

    The year without the century. If the year without the century is less than 10, the year is displayed with no leading zero (0). The application specifies %y if the format pattern is not used with other format patterns.

    yy

    The year without the century. If the year without the century is less than 10, the year is displayed with a leading zero (0).

    yyy

    The year in 3 digits. If the year is less than 100, the year is displayed with a leading zero (0).

    yyyy

    The year in 4 or 5 digits (depending on the calendar used), including the century. Pads with leading zeros (0) to get 4 digits. Thai Buddhist and Korean calendars have 5-digit years. Users selecting the yyyy pattern see all 5 digits without leading zeros (0) for calendars that have 5 digits. Exception: the Japanese and Taiwan calendars always behave as if yy is selected.

    yyyyy

    The year in 5 digits. Pads with leading zeros (0) to get 5 digits. Exception: the Japanese and Taiwanese calendars always behave as if yy is selected.

    yyyyyy

    The year in 6 digits. Pads with leading zeros (0) to get 6 digits. Exception: the Japanese and Taiwan calendars always behave as if yy is selected. The pattern can be continued with a longer string of y's padding with more leading zeros (0).

    z, %z

    The time zone offset relative to GMT (+ or - followed by the hour only). 1-digit hours do not have a leading zero (0). For example, Pacific Standard Time is -8. The application specifies %z if the format pattern is not used with other format patterns.

    zz

    The time zone offset relative to GMT (+ or - followed by the hour only). 1-digit hours have a leading zero (0). For example, Pacific Standard Time is -08.

    zzz

    The full time zone offset (+ or - followed by the hour and minutes). 1-digit hours and minutes have leading zeros (0). For example, Pacific Standard Time is -08:00.

    :

    The default time separator specified in the TimeSeparator process data variable.

    /

    The default date separator specified in the DateSeparator process data variable.