Ask Your Question
1

How do I format time:millisecondsToDateTime?

asked 2017-10-06 12:02:41 -0500

mstang gravatar image

updated 2017-10-06 12:03:34 -0500

I'm trying to use time:millisecondsToDateTime in an expression evaluator but I'm getting an error when I use it on a record value (it works fine if I hard-code a the value of the record in question).

${record:value('/TRIMODIFIEDSY')} = 1489066380730 (long) ${time:millisecondsToDateTime(1489066380730)} = Mar 9, 2017 9:33:00 AM ${time:millisecondsToDateTime(${record:value('/TRIMODIFIEDSY')})} = Fails validation ${time:millisecondsToDateTime(long(${record:value('/TRIMODIFIEDSY')}))} = Fails validation

Error for failures is: EXPR_00 - Invalid expression '${time:millisecondsToDateTime(${record:value('/TRIMODIFIEDSY')})}': com.streamsets.pipeline.api.el.ELEvalException: CMN_0105 - Error parsing expression ${time:millisecondsToDateTime(${record:value('/TRIMODIFIEDSY')})}: javax.servlet.jsp.el.ELException: Encountered "{", expected one of [".", ">", "gt", "<", "lt", "==", "eq", "<=", "le", ">=", "ge", "!=", "ne", ")", ",", "[", "+", "-", "*", "/", "div", "%", "mod", "and", "&&", "or", "||", ":", "(", "?"]

Any ideas?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2017-10-06 12:46:32 -0500

jeff gravatar image

You only need the EL ${} portion around the outermost expression. Please try ${time:millisecondsToDateTime(record:value('/TRIMODIFIEDSY'))}

edit flag offensive delete link more

Comments

That was it, thank you!!

mstang gravatar imagemstang ( 2017-10-06 13:28:00 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2017-10-06 12:02:41 -0500

Seen: 39 times

Last updated: Oct 06 '17