Skip to main content
Question

@DateTimeParse failing how do I format 20190114000000.000

  • May 17, 2019
  • 4 replies
  • 65 views

Forum|alt.badge.img+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?

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

4 replies

ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3427 replies
  • May 17, 2019

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


Forum|alt.badge.img+1
  • Author
  • 31 replies
  • May 17, 2019

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


ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3427 replies
  • May 17, 2019

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


Forum|alt.badge.img+1
  • Author
  • 31 replies
  • May 17, 2019

Ahh you are right!

My mistake in not typing the name correct.

Success. Thank you so much.