skip to main content
Input REST file syntax : Table definition entries : Date, time, and timestamp formats
  

Try DataDirect Drivers Now

Date, time, and timestamp formats

By default, the driver interprets values of the Data, Time, and Timestamp data types using the default ISO 8061 formats:
*YYYY-MM-DD
*HH:MM:SS.sssssssssZ
*YYYY-MM-DDTHH:MM:SS.sssssssssZ
The driver provides additional flexibility in parsing ISO formats:
*The value can consist of less than the full number of digits. For example, 1970-1-1 is acceptable, as opposed to 1970-01-01.
*The fractional second and timezone values are optional.
*For timestamps, dates or the date portions of values can use / or - as separators.
*For timestamps, the separator between the date and time portions can be an empty space instead of a T.
However, if necessary, you can also specify your own format after the data type element (or after #key element in the primary key column) in your column definition, using the Java SimpleDateFormat. These definitions take the following form:
"<column_name>":"<data_type>","<java_date_format>"
where:
column_name
is the name of the column.
data_type
is either the Date, Time or Timestamp data type.
java_date_format
specifies the format of your Date, Time, or Timestamp values using the Java SimpleDateFormat.
For example:
"birthday":"date","d-M-y-G"