Usually, when you receive data in GeoEvent you can define the data formats up front and let the input figure out how to handle any conversions. But sometimes, the data just doesn't work out and you are forced to try to convert data after the fact. In this specific case, we had a data stream that contains two dates in different formats. The input only allows you to define one format at a time. To get around this issue, we let the input decifer the GPS datetime (it was the more important timestamp) and wrote the second date to a string field.
String to Date conversion format...
So, now we had an event with a date defined as a string and we needed to convert that string to an actual date. Unfortunately, the GeoEvent field calculator doesn't provide any date functions. Lucky for us, GeoEvent does provide some basic "under the hood" data conversions, we just needed to know how to use them. It turns out that if you use a field mapper and map a String field to a Date field, GeoEvent will attempt to coerce that string into a date object. The trick is to format the string into ISO date format "yyyy-mm-ddThh:mm:sszone".
Example: 1:34.23 PM on July 4, 2019 EST should be formatted to be 2019-07-04T13:24:23-05:00
Using the field calculator...
If your data isn't already in this format (if it was you probably wouldn't be here) then you can use a Field Calculator to reformat it it.
Example: If your data is in the following string format RecDate='20191121224602ES' then you could use the following formula in the field calculator:
substring(RecDate,0,4) + '-' + substring(RecDate,4,6) + '-' + substring(createtimestamp,6,8) + 'T' + substring(RecDate,8,10) + ':' + substring(RecDate,10,12) + ':' + substring(RecDate,12,14) + '-05:00'
You can then use a Field Mapper to map the field holding the result of the Field Calculator above (as a string) to a new field with a data type Date.