You can specify the acceptable format for dates in a file, if you are using a system that reads data from a file.
The Open adapter rejects dates that are not in the specified format. If you do not specify an acceptable datetime format, the adapter understands datetime values only with the format yyyyMMdd or yyyyMMdd HH:mm:ss, and rejects any other datetime data.
If you specify the format in the form of a template string, use special identifiers for day, year, month, and so on, along with formatting characters. Use uppercase H for hour to ensure the use of a 24-hour clock.
Character | Description | Typical Usage |
---|---|---|
y | A digit of year | yyyy |
M | A digit of month | MM |
d | A digit of day | dd |
H | A digit of hour | HH |
m | A digit of minute | mm |
s | A digit of second | ss |
S | A digit of millisecond | SS |
If your input data contains letters, enter them in single quotation marks. For example, if the input has strings like Day:2003-12-29 Time:10:22-00, specify a datetime format of 'Day' :yyyy-MM-dd 'Time' :HH:mm:ss. Entering the format in this way prevents the Open adapter from mistaking the letters as formatting instructions.