Table of Contents

Search

  1. Preface
  2. Part 1: Concepts and Models
  3. Part 2: Custom XConnect Created with a Load Template
  4. Appendix A: Resource Configuration File

Metadata Manager Custom Metadata Integration Guide

Metadata Manager Custom Metadata Integration Guide

Date Formats in Metadata Source Files

Date Formats in Metadata Source Files

You can specify the format for dates in a metadata source file. To specify the date format, set the dateFormat attribute in the loadTemplate element of the load template. You can specify any valid Java date format.
The following table describes the characters that you use to construct a date format:
Character
Description
G
Era designator, for example, AD.
y
Year:
  • Enter
    yy
    for two-digit year values. For example, 14.
  • Enter
    yyyy
    for four-digit year values. For example, 2014.
Metadata Manager interprets two-digit year values to be within 80 years before and 20 years after the date the resource is loaded. For example, if you load the resource on Jan. 1, 2015, Metadata Manager interprets the year "30" as 2030, however, it interprets the year "40" as 1940.
Y
Week year:
  • Enter
    yy
    for two-digit year values. For example, 98.
  • Enter
    yyyy
    for four-digit year values. For example, 1998.
Metadata Manager interprets two-digit year values to be within 80 years before and 20 years after the date the resource is loaded.
M
Month in year:
  • Enter
    MM
    for numeric, two-digit month values. For example, 07.
  • Enter
    MMM
    for three-character abbreviations for the month. For example, Jul.
  • Enter
    MMMM
    for the full names of the month. For example, July.
Metadata Manager does not accept abbreviated month values that are not three characters in length. For example, Metadata Manager does not accept "Sept" for September.
w
Numeric week in year.
W
Numeric week in month.
D
Numeric day in year.
d
Numeric day in month.
F
Numeric day of week in month, for example, 2 for the second Wednesday in June.
E
Day name in week.
Metadata Manager accepts three-character abbreviations for the day or the full name of the day, for example, "Tue" or "Tuesday." Metadata Manager does not accept abbreviations that are not three characters in length. For example, Metadata Manager does not accept "Thurs," "R," or "Th" for Thursday.
u
Numeric day in week, for example, 1 for Sunday.
a
AM/PM designator, for example, AM.
Metadata Manager does not accept period characters in the AM/PM designator. For example, Metadata Manager does not accept "a.m." or "p.m."
H
Numeric hour in day (0-23).
k
Numeric hour in day (1-24).
K
Numeric hour in AM/PM (0-11).
h
Numeric hour in AM/PM (1-12).
m
Numeric minute in hour.
s
Numeric second in minute.
S
Numeric millisecond.
z
General time zone:
  • Enter
    zzz
    for the abbreviated name of the time zone. For example, PST.
  • Enter
    zzzz
    for the full name of the time zone. For example, Pacific Standard Time.
Z
RFC 822 time zone, for example, -0800.
X
ISO 8601 time zone:
  • Enter
    X
    for the sign and two-digit hours. For example, -08.
  • Enter
    XX
    for the sign, two-digit hours, and minutes. For example, -0800.
  • Enter
    XXX
    for the sign, two-digit hours, a colon (
    :
    ), and minutes. For example, -08:00.
'
Escape character for alphabetic characters.
''
Single quote character, for example:
'
For numeric values, Metadata Manager ignores the number of format characters unless the number of characters is needed to separate adjacent numeric fields.
Examples
The following example shows how to set the dateFormat attribute for date values such as 12/25/2002:
dateFormat="MM/dd/yyyy"
The following example shows how to set the dateFormat attribute for date values such as 05-Feb-96:
dateFormat="dd-MMM-yy"
The following example shows how to set the dateFormat attribute for date values such as Fri 2014.07.18 at 04:14:09 PM PDT:
dateFormat="E yyyy.MM.dd 'at' hh:mm:ss a zzz"
The following example shows how to set the dateFormat attribute for date values such as 1996-03-14T12:08:56.235-07:00:
dateFormat="yyyy-MM-dd'T'HH:mm:ss.SSSXXX"
The following example shows how to set the dateFormat attribute for date values such as 990731120856-0800:
dateFormat="yyMMddHHmmssZ"

0 COMMENTS

We’d like to hear from you!