Skip to main content

I'm trying to overwrite a date/time field with two columns from an excel file. I'd like to use attribute manager to concatenate the two columns into (Date) MM/dd/yyyy and (Time) HH🇲🇲ss AM/PM however I'm getting null values.

 

The datetimeconverter led to an error saying my format wasn't FME standard.

 

Any help is appreciated, thank you.

What is sample data from Excel?  What is sample features in the Data Inspector from the Excel Reader?

 

Depending on Operating System Configuration, and how Dates and Times have been entered into Excel, the Excel Reader may or may not automatically transform the Excel values into an FME date string, and FME time string, or an FME datetime string.  This has to be checked first to see how the Reader is handling the cell values, and if the Reader has been configured in the Parameters for these columns to be treated as dates or times or instead the Reader when it scanned the columns decided to just treat them as raw strings or a decimal number (Excel natively stores dates and times as number of days from Jan 1, 1900).

 

Second, DateTimeConvertor is really just a string reformatter with some helper conversion functions.  The parameters needs to be the string pattern that the input date, time or datetime value is in, and another parameter set as to which string pattern to output the values are.   If it is saying that it isn’t an FME datetime pattern in the input Features, then the input values are not in the FME datetime form Eg. 20240921102900 for YearMonthDayHourMinSec and so it doesn’t know what its pattern is without manually setting the “Input Parameter” value to match the pattern of the input date attribute, and separately potentially in another DateTimeConvertor, the pattern of the input time attribute.

To create a datetime out of an FME date string format, and an FME time string format is literally just concantenate the strings together like this

 


Reply