Convert field values to python datetime.
Example
Example Input
dim_A | start_date | end_date |
abc | 2017-01-01 | 2017-01-30 |
EEE | 2017-03-14 | 2017-04-02 |
aaBAa | 2017-05-13 | 2017-05-18 |
Example Output
dim_A | start_date | end_date |
abc | Jan. 1, 2017 | Jan. 30, 2017 |
EEE | Mar. 14, 2017 | Apr. 2, 2017 |
aaBAa | May 13, 2017 | May 18, 2017 |
I Ain't Afraid of No Code!
[
[
"convertdates",
{
"fields": [
"date_field_1",
"date_field_2"
],
"subtable": null,
"strict": false,
"datetime": false,
"format": "%Y-%m-%d",
"_comment": null
}
]
]
param str fields: Fields to be converted to datetime.datetime.
param str subtable: Name a subtable in which output will be stored (will create subtable where necessary).
param boolean strict: If set to true returns value None when conversion fails.
param boolean datetime: Set to true if you’re parsing a date+time combo, for date only set to false. Default is false.
param str format: Date Pattern.
param str comment: A comment that will appear in the Transformation UI.
Comments
0 comments
Article is closed for comments.