The task orchestration feature of Data Management (DMS) supports multiple time variables. You can reference predefined time variables in a task or a task flow. This feature simplifies SQL statements and improves development efficiency.
Procedure
Time formats
The following table describes the time variables that can be used to define the time format of a custom variable.
Time variable | Description | Sample format | Sample value |
---|---|---|---|
Anno Domini (AD) | G indicates AD. | Gyyyy | AD 2021 |
Year |
|
yyyy | 2021 |
Month | M: the month of the year when the task is run. Valid values of M: [1,12]. Valid values of MM: [01,12]. | MM | 08 |
Week |
|
ww | 13 |
Day |
|
D | 360 |
Day of the week |
|
e | 1 |
Ante meridiem (AM) or post meridiem (PM) | a: indicates whether the point in time when the task is run is before or after the midday. If the point in time is in the range of 00:00 to 11:59, the return value is AM. If the point in time is in the range of 12:00 to 23:59, the return value is PM. | a | AM |
Hour |
|
HH | 10 |
Minute | m: the minute of the hour when the task is run. Valid values of m: [0,59]. Valid values of mm: [00,59]. | m | 27 |
Second |
|
ss | 08 |
Time zone | z: the time zone. | z | UTC+08:00 |
The following table describes the sample time formats that use multiple time variables.
Sample format | Sample value |
---|---|
yyyy-MM-dd |
2019-08-02 |
HH:mm:ss |
11:05:21 |
yyyyMMdd HH:mm:ss |
20190802 11:05:21 |
yyyyMM01 |
20190801 |