Ask Your Question

How to convert string into datetime by using Expression Evaluator? input record is in ISO8601+UTC (string)

asked 2019-11-25 16:46:14 -0500

anonymous user


updated 2019-11-25 17:04:54 -0500

  • From input source /ts (STRING) column in ISO8601+UTC ex: 2019-11-21T11:46:06.138421+00:00

I'wanted to convert this into datatime from string

But Field Type Converter uses the machine's local time, when it does date/time conversions! and now i wanted to use Expression Evaluator can you please help me out with expected output field to be used for time:extractStringFromDateTZ(<date object="">, <time zone="">, <format string="">)

image description

Thank you! :- )

edit retag flag offensive close merge delete


Do you want 2019-11-21T11:46:06.138421+00:00 converted to Nov 21, 2019 3:48:24 AM?

iamontheinet gravatar imageiamontheinet ( 2019-11-25 18:52:16 -0500 )edit

If that is just format changes and its still in original time UTC conversions zone then i'am fine with it. i would like to have the out-put as you provided but not in string i need out-put in datatime format. FYI: I'm loading data from kafka-avro event_topic"X" colm/timestamp =(as above example) an

strem_dev gravatar imagestrem_dev ( 2019-11-26 09:07:13 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2019-11-26 09:47:13 -0500

iamontheinet gravatar image

updated 2019-11-26 11:04:44 -0500


Use Field Type Converter and Expression Evaluatorwith the following settings and that should work. For details and examples on supported formats, refer to

image description

image description

image description

image description

Cheers, Dash

edit flag offensive delete link more


Hi Dash, thanks for this!! i have try'd this way already when we use field type converter its not reading the original record time stamp. it's converting into local SDC time stamp which I don't wanted to convert that into local time. i want to read the source time with-out local time converter.

strem_dev gravatar imagestrem_dev ( 2019-11-26 10:20:09 -0500 )edit

See my updated answer.

iamontheinet gravatar imageiamontheinet ( 2019-11-26 10:31:50 -0500 )edit

Yup! This is great but as i mentioned before we loading this into realtime DB influx. we needed out-put in datetime format not in string :(

strem_dev gravatar imagestrem_dev ( 2019-11-26 10:51:11 -0500 )edit

${time:createDateFromStringTZ(record:value('/ts'),'UTC', "yyyy-MM-dd HH:mm:ss")} try'd by using this function but still no luck in UTC time zone :(

strem_dev gravatar imagestrem_dev ( 2019-11-26 10:56:10 -0500 )edit

Yep, see my updated answer.

iamontheinet gravatar imageiamontheinet ( 2019-11-26 11:05:07 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2019-11-25 16:46:14 -0500

Seen: 199 times

Last updated: Nov 26 '19