In earlier releases of SAS Event Stream Processing, the default date format for date and timestamp fields is %Y-%m-%d %H:%M:%S. In those releases, you can specify the date format when you initialize the event-stream processing engine or when you start the XML server. You can also specify the date format as a parameter on a connector or adapter.
Starting with SAS Event Stream Processing 4.1, the way in which date and timestamp fields are processed for data formats has changed.
- The new, default date format uses integer values that have occurred since the start of UNIX epoch time (which starts with the date 1/1/1970).
- The ESP_DATETIME fields contain a 64-bit integer that represents the number of seconds
since the epoch time value.
- The ESP_TIMESTAMP fields contain a 64-bit integer that represents the number of microseconds since the epoch time value.
- In release 4.1, you also cannot specify the date format when you initialize the event-stream processing engine or when you start the XML server.
To use an alternative date format to exchange events, you now must specify the format on the connector or adapter that is the source or the sink of the data. All connectors and adapters that support the parsing of timestamp and date fields include an optional date-format parameter for this purpose.
An error in parsing a date or timestamp field might occur if the date format is not specified. For example, if a simple model uses an ID field and a timestamp field from a CSV file that contains one header line, the input data is as follows:
opcode,flag,ID,Timestamp
i,n,1,2016-08-03 12:20:50.339
If you do not specify the date format on the file connector or adapter, the following error occurs when the data is processed:
2016-08-08T11:35:42,078; ERROR; 00000011; DF.ESP; (dfESPevent.cpp:230); dfESPevent::dfESPevent(): Conversion of parsed
field <2016-08-03 12:20:50.339> failed for datafield[1] in delimited event <i,n,1,2016-08-03 12:20:50.339>
2016-08-08T11:35:42,078; ERROR; 00000011; DF.ESP; (dfESPconnector.cpp:959); dfESPconnector::eventFromCSV(): Could not
create dfESPevent
To read in data without an error, code the date format in one of the following ways:
The date-format string is specified in the format used in the strptime() function.
Operating System and Release Information
SAS System | SAS Event Stream Processing Engine | Linux for x64 | 4.1 | | | |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.