Question

@DateTimeParse failing how do I format 20190114000000.000


Badge +1

DateTimeConverter transformer will convert this date type 20190114000000.000

However I also have null attributes so it rejects the data on reaching the first null value.

I have tried using Attribute Manager and the @DateTimeParse function but keep getting this error

 

AttributeManagerIfValueDateParse: '%Y' was successfully parsed, then failed to parse '-%m-%d %H:%M:%S'

AttributeManagerIfValueDateParse: Failed to evaluate expression '@DateTimeParse(20190114000000.000,%Y-%m-%d %H:%M:%S)'. Result is set to null.

 

Does the function not support this date format?


4 replies

Userlevel 1
Badge +10

If you are wanting an output of 2019-01-14 00:00:00 then you need to @DateTimeFormat

 

But you should also be able to use the DateTimeConverter and set passthrough nulls, empties or missing to Yes

Badge +1

If you are wanting an output of 2019-01-14 00:00:00 then you need to @DateTimeFormat

 

But you should also be able to use the DateTimeConverter and set passthrough nulls, empties or missing to Yes

I am using 2017.1 so the DatetimeConverter does not have set passthough options.

 

using @dateTimeformat on my output does not work

Userlevel 1
Badge +10

I am using 2017.1 so the DatetimeConverter does not have set passthough options.

 

using @dateTimeformat on my output does not work

Not 100% sure if DateTimeFormat is available in 2017 (i think it should be) but the case matters here and I notice you have a DateTimeformat not DateTimeFormat. If you go into the text editor you can check what Date/Time functions are available on the left hand side

Badge +1

Ahh you are right!

My mistake in not typing the name correct.

Success. Thank you so much.

Reply