Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space DEV and version r0871

...

  • Earliest: January 1, 1400

    Info

    NOTE: Two-digit values for the year that are older than 80 years from the current year are forward-ported into the future. For example, in a job run on Dec 31, 2021, the date 01/01/41 is interpreted as 01/01/1941. However, if the job is run the next day (January 01, 2022), then the same data is interpreted as 01/01/2041. See "Two-digit year values" below.

  • Latest: December 31, 2599


Info

NOTE: The supported date ranges can be modified if needed. For more information, see Configure Application Limits.

You can use dates in the Gregorian calendar system only. Dates in the Julian calendar are not supported.

...

LetterDate or Time ComponentPresentationExamples
MMonth in yearNumber1
MMMonth in yearNumber01
MMMMMonth in yearMonthJanuary
MMMMonth in yearMonthJan
yyYearNumber

16

Info

NOTE: Two-digit values for the year that are older than 80 years from the current year are forward-ported into the future. For example, in a job run on Dec 31, 2021, the date 01/01/41 is interpreted as 01/01/1941. However, if the job is run the next day (January 01, 2022), then the same data is interpreted as 01/01/2041. See "Two-digit year values" below.

yyyyYearNumber2016
DDay in yearNumber352
dDay in monthNumber9
ddDay in a monthNumber09
EEE Day in week (three-letter abbreviation)TextWed
EEEEDay in weekTextWednesday
h

Hour in day (1-12)

Info

NOTE: Requires an AM/PM indicator (a).

Number2
hh

Hour in am/pm (01-12)

Info

NOTE: Requires an AM/PM indicator (a).

Number02
HHour in day (1-12)Number2
HHHour in day (0-23)Number20
mMinute in an hourNumber9

mm

Minute in an hourNumber09
sSecond in a minuteNumber3
ssSecond in a minuteNumber03
SSS MillisecondNumber218
XTime zoneISO 8601 time zone-08:00
aAM/PM indicatorStringAM


Info

NOTE: When publishing to relational targets, Datetime values are written as date/time values in newly created tables. If you are appending to a relational table column that is in timestamp format, Datetime values can be written as timestamps.


Tip

Tip: If your DateTime column contains data in multiple formats, you must change the format of the DateTime column to one format and then add a transformation to convert that data to the other format. When all formats of your source date values are converted to a single format, the application should infer the appropriate date and time format.

...

  • Support for timezone offset from UTC indicated by +hh:mm, +hhmm, or +hh. For example, the date '2013-11-18 11:55-04:00' is recognized as a DateTime value.

  • Datetime part functions (for example, Hour) truncate time zones and return local time.
  • If you have a column with multiple time zones, you can convert the column to Unixtime so you can perform Date/Time operations with a standardized time zone. If you want to work with local times, you can truncate the time zone or use other Datetime functions. See UNIXTIME Function.

Two-

...

digit year values

Depending on the system, a two-digit value for year in a Datetime value is subject to different interpretations. In 

D s product
, two-digit values for the year that are older than 80 years from the current year are forward-ported into the future.

...

 For example, in a

...

job run on Dec 31, 2021, the

...

date 01/01/41

...

 is interpreted as 01/01/1941. However, if the job is run the next day (January 01, 2022), then the same data is interpreted as 01/01/2041.

Other systems use different limits for backward versus forward porting of year values:

As a result, it can be a challenge to manage these system-dependent two-digit years in a consistent manner. 

Tip

Tip: For best results, you should format year values as four-digit values before the data is ingested into

D s product
. Four-digit years are consistently represented across all systems.

If the above is not possible, you can create replacement steps in your recipe to convert two-digit years to four-digit values. In the following example, 00-39 is interpreted as a 19XX year, while 40-99 is interpreted as a 20XX year: 

D trans
RawWrangletrue
p03Value19$1
Typestep
WrangleText##NO_WRANGLE##
p01NameColumn
p01ValuemyDateColumn
p02NameFind
p02Value/\b([456789][0-9])\b$/
p03NameReplace with
SearchTermReplace text or pattern

and

D trans
RawWrangletrue
p03Value20$1
Typestep
WrangleText##NO_WRANGLE##
p01NameColumn
p01ValuemyDateColumn
p02NameFind
p02Value/\b([0123][0-9])\b$/
p03NameReplace with
SearchTermReplace text or pattern

Supported Datetime Formats

...

Code Block
"end_date": [
            "Datetime",
            "mm-dd-yy",
            "mm*dd*yyyy"
        ]
Array ElementDescriptionExample 1Example 2
Data typeThe internal name for the data type. For Datetime columns, this schema value should always be Datetime."Datetime""Datetime"
Sub-formatThe general format category of the data type"mm-dd-yy""mm-dd-yy"
Format typeThe specific formatting for the data type"mm*dd*yyyy""shortMonth*dd*yy"