Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How do I format time:millisecondsToDateTime?

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(${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?

How do I format time:millisecondsToDateTime?

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(${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?