The “Datetime From String” processor is a handy tool that helps convert human-readable datetime information into a format that machines can understand. This is particularly useful when dealing with data that includes dates and times.
In the context of event streams, you may encounter dates and times formatted for human readability but not necessarily optimized for computer processing. The “Datetime From String” processor addresses this by facilitating the conversion of human-readable datetime information within your continuous stream of events.
When you input a data stream into this processor containing a datetime in a specific format (such as “2023-11-24 15:30: 00”), it undergoes a transformation. The processor converts it into a computer-friendly format called a ZonedDateTime object.
Let‘s say you have an event stream with a property containing values like “2023-11-24 15:30:00” and you want to make sure your computer understands it. You can use this processor to convert it into a format that’s machine-friendly.
To use this processor, you need one thing in your data:
The only thing you need to configure is the time zone.
After the conversion happens, the processor adds a new piece of information to your data stream:
dateTime
value refers to. Can be used to reconstitute the actual time.