Why does this not work?
SSIS Errors (Since @DateTimeFormat(@Value(init_start_time),'%b/%e/%Y') at @DateTimeFormat(@Value(init_start_time),'%T'))
Why does this not work?
SSIS Errors (Since @DateTimeFormat(@Value(init_start_time),'%b/%e/%Y') at @DateTimeFormat(@Value(init_start_time),'%T'))
Hi @deanrother, what value does the attribute "init_start_time" store?
What version of FME are you using? The expression works fine in FME 2017.1 if the "init_start_time" stores a date/time string formatted in YYYYmmddHHMMSS. However, FME 2017.0 possibly has a bug here.
Hi @deanrother
this expression should work if init_start_time is a valid datetime value in FME datetime format. If init_start_time is not a valid datetime value, you will find a warning in the log explaining why the expression failed. This is what I got with init_start_time = 3:
|WARN |AttributeCreator: Failed to parse '3' as a datetime value. For FME datetime syntax, please see http://docs.safe.com/fme/html/FME_Desktop_Documentation/FME_Workbench/!Transformer_Parameters/standard_fme_date_time_format.htm
|WARN |AttributeCreator: Failed to evaluate expression '@DateTimeFormat(3,'%b/%e/%Y')'. Result is set to null.
|WARN |AttributeCreator: Failed to parse '3' as a datetime value. For FME datetime syntax, please see http://docs.safe.com/fme/html/FME_Desktop_Documentation/FME_Workbench/!Transformer_Parameters/standard_fme_date_time_format.htm
|WARN |AttributeCreator: Failed to evaluate expression '@DateTimeFormat(3,'%T')'. Result is set to null.
Can you find any warnings in your log?
Hi @deanrother
this expression should work if init_start_time is a valid datetime value in FME datetime format. If init_start_time is not a valid datetime value, you will find a warning in the log explaining why the expression failed. This is what I got with init_start_time = 3:
|WARN |AttributeCreator: Failed to parse '3' as a datetime value. For FME datetime syntax, please see http://docs.safe.com/fme/html/FME_Desktop_Documentation/FME_Workbench/!Transformer_Parameters/standard_fme_date_time_format.htm
|WARN |AttributeCreator: Failed to evaluate expression '@DateTimeFormat(3,'%b/%e/%Y')'. Result is set to null.
|WARN |AttributeCreator: Failed to parse '3' as a datetime value. For FME datetime syntax, please see http://docs.safe.com/fme/html/FME_Desktop_Documentation/FME_Workbench/!Transformer_Parameters/standard_fme_date_time_format.htm
|WARN |AttributeCreator: Failed to evaluate expression '@DateTimeFormat(3,'%T')'. Result is set to null.
Can you find any warnings in your log?
AttributeCreator: Failed to evaluate expression '@DateTimeFormat(20170915123456,'%b/%e/%Y')'. Result is set to null.
Storing feature(s) to FME feature store file `.\mapping_log.ffs'
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Feature Type: `Creator_CREATED'
Attribute(string) : `_formatted' is <null>
Attribute(string) : `fme_expression_warnings{0}.attributeName' has value `_formatted'
Attribute(string) : `fme_expression_warnings{0}.message' has value `Failed to evaluate expression '@DateTimeFormat(20170915123456,'%b/%e/%Y')'. Result is set to null.'
Attribute(string) : `fme_expression_warnings{0}.transformerName' has value `AttributeCreator'
AttributeCreator: Failed to evaluate expression '@DateTimeFormat(20170915123456,'%b/%e/%Y')'. Result is set to null.
Storing feature(s) to FME feature store file `.\mapping_log.ffs'
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Feature Type: `Creator_CREATED'
Attribute(string) : `_formatted' is <null>
Attribute(string) : `fme_expression_warnings{0}.attributeName' has value `_formatted'
Attribute(string) : `fme_expression_warnings{0}.message' has value `Failed to evaluate expression '@DateTimeFormat(20170915123456,'%b/%e/%Y')'. Result is set to null.'
Attribute(string) : `fme_expression_warnings{0}.transformerName' has value `AttributeCreator'
I'm on 2017.0. So maybe a bug.
I'm on 2017.0. So maybe a bug.
it is not really a bug: %e was implemented in 2017.1, i.e. you are trying to use a flag that is not supported by 2017.0. Would you consider upgrading to 2017.1?
it is not really a bug: %e was implemented in 2017.1, i.e. you are trying to use a flag that is not supported by 2017.0. Would you consider upgrading to 2017.1?