Forum Discussion
What about setting the default behavior to send all of the errors to the error pipeline, where you can develop a logic to classify the errors based on the incoming data?
- tstack6 years agoFormer Employee
Can you give an example of one of these timestamps? It looks like
LocalDateTime.parse()
is not parsing it correctly and returning aNaN
. Also, is there are reason you’re usingLocalDateTime.parse()
instead ofDate.parse()
? Note thatLocalDateTime
objects do not have the date math methods likeminusDays()
. - vaidyarm6 years agoContributor
Ex :
2019-08-09T06:51:07.000this need to be converted like : 2019-08-08T00:00:00.000
- cjhoward186 years agoEmployee
This expression:
Date.parse(“2019-08-09T06:51:07.000”).minusDays(1).toLocaleDateString()+“T00:00:00.000”results in: 2019-08-08T00:00:00.000
Note the only change in the expression from your original one is the use of Date.parse() instead of LocalDateTime.parse()
- vaidyarm6 years agoContributor
for this logic :
Date.parse(“2019-08-09T06:51:07.000”).minusDays(1).toLocaleDateString()+“T00:00:00.000”error :
Could not compile expression: Date.parse(“2019-08-09T06:51:0 … (Reason: Invalid token: ‘“’ for expression: Date.parse(“2019-08-09T06:51:0 …; Resolution: Please check expression syntax)attached are screenshots.
- cjhoward186 years agoEmployee
The quotes you have copied and pasted into the mapper are invalid quote characters.
Please delete the quotes and retype them in the mapper and the expression will work as expected.
- vaidyarm6 years agoContributor
Got the issue…
it was “ causing the issue, where it should be "thanks for your great help and follow up @cjhoward18 .