[
https://issues.apache.org/jira/browse/AIRFLOW-1092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16125064#comment-16125064
]
Megan Patten commented on AIRFLOW-1092:
---------------------------------------
{{execution_date}} is a datetime, not a string:
https://github.com/apache/incubator-airflow/blob/v1-8-stable/docs/code.rst
I think something like {{ execution_date.strftime( '%Y-%m-%d %H:%M:%S.%f') }}
would work for you instead
> {{execution_date}} not matching '%Y-%m-%d %H:%M:%S.%f'
> ------------------------------------------------------
>
> Key: AIRFLOW-1092
> URL: https://issues.apache.org/jira/browse/AIRFLOW-1092
> Project: Apache Airflow
> Issue Type: Bug
> Components: scheduler, utils
> Affects Versions: Airflow 1.8
> Environment: CentOS
> Reporter: Xi Wang
> Priority: Critical
>
> Hi there,
> I was trying to use datetime.strptime({{ execution_date }}, '%Y-%m-%d
> %H:%M:%S.%f') to format some files names, but an error was returned saying {{
> execution_date }} format is not matching the provided one. Could anyone take
> a look?
> Thx!
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)