チェーン内の日付やタイムスタンプの変数や出力がどのように表示されるかを書式設定するには、 Parse Date/Timeトランスフォーメーションを適用し、値を文字列の書式設定時間(strftime)に設定します。
<!--<ul> <li> Paste the raw transformation as the command property's value. </li> </ul>String format time
To use a Parse Date/Time transformation to set the format of a date or timestamp, enter its values as strftime.
-->日付の値
| 値 | 例 | ストロフタイム |
|---|---|---|
| 全日名称 | 日曜日 |
%A |
| 曜日名称の略称 | 日 |
%a |
| 曜日 | 0 ~6 、日曜日は0 |
%w |
| 2桁年 | 21 |
%y |
| 4桁年 | 2021 |
%Y |
| 月名称 | 1 月 |
%B |
| 略記月名称 | 1月 |
%b |
| 2桁の月 | 01 ~12 、1月~12月 |
%m |
| 月の2桁の日付 | 01~31 |
%d |
| 先頭ゼロなしの日付 | 1~31 |
%e |
これらの値をつなげて、日付の書式を設定することができる。例:
| データ書式設定 | 例 | ストロフタイム |
|---|---|---|
| mm/dd/yyyy | 12/01/2021 |
m/%d/%Y |
| [完全な曜日]、[完全な月名称]、[先頭ゼロなしの月日]、[4桁の年] | 2021年12月1日(水) |
A、%B %e、%Y |
| [月名] [先頭ゼロなしの月日] [曜日名の略称]。 | Dec 1 Wed |
%b %e %a |
時間値
| 値 | 例 | ストロフタイム |
|---|---|---|
| 24時間時計の時 | 00 から23 |
%H |
| 12時間時計の時 | 01~12 |
%I |
| 先頭ゼロのない12時間時計の時 | 1 から12 |
%1 |
| 分 | 00 から59 |
%M |
| 第2 | 00~60 |
%S |
| Ante またはpost meridium | AM またはPM |
%p |
| タイムゾーン | +08 |
%Z |
| 年の日付 | 001~366 |
%m |
| パーセンテージ記号 | % |
%% |
これらの値をつなげて、時間の書式を設定することができる。例:
| データ書式設定 | 例 | ストロフタイム |
|---|---|---|
| HH:MM(24時間表示) | 23:01 |
H:%M |
| H:MMは12時間表示、ante 、またはpost meridium。 | 4:31 PM |
1:%M %p |
Raw transformations
Rather than apply a transformation to a variable or output used as a command property, you can copy and paste these raw transformations in the command property:
<h3>Timestamp</h3>For a full date and timestamp value, such as 2021-03-15T16:04:28.744118Z:
<pre>$(Chain.ExecutionDateTime)</pre> <h3>Time</h3>For the hour and minutes, such as 1610:
<pre>$(Chain.ExecutionDateTime)@transform{parseDateTimeOC_SPLIT%FT%T.%fZOC_ARG%H%MOC_ARGOC_ARGOC_ARG}</pre>For the hour, minutes, and seconds, such as 161051:
<pre>$(Chain.ExecutionDateTime)@transform{parseDateTimeOC_SPLIT%FT%T.%fZOC_ARG%H%M%SOC_ARGOC_ARGOC_ARG}</pre> <h3>Date</h3>With date values, the raw transformation can set the format for the current date or include subtractions to set previous years' values.
<h4>Current year</h4>For the current, four-digit year:
<pre>$(Chain.ExecutionDateTime)@transform{parseDateTimeOC_SPLIT%FT%T.%fZOC_ARG%YOC_ARGOC_ARGOC_ARG}</pre>For the current month and four-digit year:
<pre>$(Chain.ExecutionDateTime)@transform{parseDateTimeOC_SPLIT%FT%T.%fZOC_ARG%m%YOC_ARGOC_ARGOC_ARG}</pre>For the full current date, starting with the day, such as 31102021:
<pre>$(Chain.ExecutionDateTime)@transform{parseDateTimeOC_SPLIT%FT%T.%fZOC_ARG%d%m%YOC_ARGOC_ARGOC_ARG}</pre>For the full current date, starting with the month, such as 10312021:
<pre>$(Chain.ExecutionDateTime)@transform{parseDateTimeOC_SPLIT%FT%T.%fZOC_ARG%m%d%YOC_ARGOC_ARGOC_ARG}</pre> <h4>Previous year</h4>For the previous, four-digit year:
<pre>$(Chain.ExecutionDateTime)@transform{dateMathOC_SPLIT%FT%T.%fZOC_ARGsubtractOC_ARG1OC_ARGyearsOC_ARG}@transform{parseDateTimeOC_SPLIT%FT%T.%fZOC_ARG%YOC_ARGOC_ARGOC_ARG}</pre>For the current month a year ago:
<pre>$(Chain.ExecutionDateTime)@transform{dateMathOC_SPLIT%FT%T.%fZOC_ARGsubtractOC_ARG1OC_ARGyearsOC_ARG}@transform{parseDateTimeOC_SPLIT%FT%T.%fZOC_ARG%m%YOC_ARGOC_ARGOC_ARG}</pre>For the current date a year ago, starting with the day, such as 31102020:
<pre>$(Chain.ExecutionDateTime)@transform{dateMathOC_SPLIT%FT%T.%fZOC_ARGsubtractOC_ARG1OC_ARGyearsOC_ARG}@transform{parseDateTimeOC_SPLIT%FT%T.%fZOC_ARG%d%m%YOC_ARGOC_ARGOC_ARG}</pre>For the current date a year ago, starting with the month, such as 10312020:
<pre>$(Chain.ExecutionDateTime)@transform{dateMathOC_SPLIT%FT%T.%fZOC_ARGsubtractOC_ARG1OC_ARGyearsOC_ARG}@transform{parseDateTimeOC_SPLIT%FT%T.%fZOC_ARG%m%d%YOC_ARGOC_ARGOC_ARG}</pre> <h4>The year before last</h4>For the four-digit year, two years ago:
<pre>$(Chain.ExecutionDateTime)@transform{dateMathOC_SPLIT%FT%T.%fZOC_ARGsubtractOC_ARG2OC_ARGyearsOC_ARG}@transform{parseDateTimeOC_SPLIT%FT%T.%fZOC_ARG%YOC_ARGOC_ARGOC_ARG}</pre>For the current month two years ago:
<pre>$(Chain.ExecutionDateTime)@transform{dateMathOC_SPLIT%FT%T.%fZOC_ARGsubtractOC_ARG2OC_ARGyearsOC_ARG}@transform{parseDateTimeOC_SPLIT%FT%T.%fZOC_ARG%m%YOC_ARGOC_ARGOC_ARG}</pre>For the current date two years ago, starting with the day, such as 31102019:
<pre>$(Chain.ExecutionDateTime)@transform{dateMathOC_SPLIT%FT%T.%fZOC_ARGsubtractOC_ARG2OC_ARGyearsOC_ARG}@transform{parseDateTimeOC_SPLIT%FT%T.%fZOC_ARG%d%m%YOC_ARGOC_ARGOC_ARG}</pre>For the current date a year ago, starting with the month, such as 10312019:
<pre>$(Chain.ExecutionDateTime)@transform{dateMathOC_SPLIT%FT%T.%fZOC_ARGsubtractOC_ARG2OC_ARGyearsOC_ARG}@transform{parseDateTimeOC_SPLIT%FT%T.%fZOC_ARG%m%d%YOC_ARGOC_ARGOC_ARG}</pre> -->