Error with parse-dateTime in BW 5.13

Hi,

I´m trying to parse a dateTime with parse-dateTime:

tib:parse-dateTime('EEE MMM dd HH:mm:ss Z yyyy', 'Fri Aug 16 17:32:21 CDT 2019') but i get this error:

com.tibco.xml.xquery.ExprException: Unparseable date: "Fri Aug 16 17:32:21 CDT 2019"

com.tibco.xml.xquery.ExprException: Unparseable date: "Fri Aug 16 17:32:21 CDT 2019"

    at com.tibco.xml.xpath.function.eu.typedValue(TibcoAbstractParseDatesAndTimesFunction.java:106)

    at com.tibco.xml.xpath.expr.n.typedValue(DefaultFunctionCallExpr.java:86)

    at com.tibco.xml.transform.impl.expr.aw.execute(TmValueOfLegacyExpr.java:34)

    at com.tibco.xml.transform.impl.expr.Q.execute(TmLiteralResultElementExpr.java:141)

    at com.tibco.xml.transform.impl.expr.aF.execute(XslContentExpr.java:136)

    at com.tibco.xml.transform.impl.expr.Q.execute(TmLiteralResultElementExpr.java:141)

    at com.tibco.xml.transform.impl.expr.Q.execute(TmLiteralResultElementExpr.java:141)

    at com.tibco.xml.transform.impl.expr.aF.execute(XslContentExpr.java:136)

    at com.tibco.xml.transform.impl.expr.Q.execute(TmLiteralResultElementExpr.java:141)

    at com.tibco.xml.transform.impl.expr.f.a(DefaultTemplateExpr.java:143)

    at com.tibco.xml.transform.impl.expr.e.a(DefaultModuleTransformExpr.java:289)

    at com.tibco.xml.transform.impl.expr.e.a(DefaultModuleTransformExpr.java:173)

    at com.tibco.xml.transform.trax.h.transform(TmTransformerImpl.java:318)

    at com.tibco.xml.xdata.bind.OnceOnlyBinding.stream(Unknown Source)

    at com.tibco.xml.xdata.bind.OnceOnlyBinding.getXiNode(Unknown Source)

    at com.tibco.pe.plugin.Activity.eval(Unknown Source)

    at com.tibco.pe.core.TaskImpl.eval(Unknown Source)

    at com.tibco.pe.core.Job.a(Unknown Source)

    at com.tibco.pe.core.Job.k(Unknown Source)

    at com.tibco.pe.core.JobDispatcher$JobCourier.a(Unknown Source)

    at com.tibco.pe.core.JobDispatcher$JobCourier.run(Unknown Source)

    at com.tibco.xml.xdata.bind.BindingRemarkHandler.assertNoErrors(Unknown Source)

    at com.tibco.xml.xdata.bind.OnceOnlyBinding.assertNoErrors(Unknown Source)

    at com.tibco.pe.core.TaskImpl.eval(Unknown Source)

    at com.tibco.pe.core.Job.a(Unknown Source)

    at com.tibco.pe.core.Job.k(Unknown Source)

    at com.tibco.pe.core.JobDispatcher$JobCourier.a(Unknown Source)

    at com.tibco.pe.core.JobDispatcher$JobCourier.run(Unknown Source)

When trying with the BW´s example in the function´s descrption: 

tib:parse-dateTime('EEE MMM dd HH:mm:ss yyyy', 'Sat Sep 12 04:10:33 1970')

I'm get this error:

There is a binding error associated with activity. Map Data

BWENGINE-100030 Job-41000 Error in [AS065_DigitalChannelsInfo/Utilities/Process Definition.process/Map Data]

Input data invalid

caused by: org.xml.sax.SAXException:

com.tibco.xml.xquery.ExprException: Unparseable date: "Sat Sep 12 04:10:33 1970"

com.tibco.xml.xquery.ExprException: Unparseable date: "Sat Sep 12 04:10:33 1970"

 Hope you can help me with this.

Thanks

 

 

 

(2) Answers

Login