TO_TIMESTAMP converts a string into a DATE. The format of the input string can be defined.
The following fields are supported to define the input format:
- YYYY: 4 digit year
- MM: 2 digit month of year
- DD: 2 digit day of month
- HH: 2 digit hour of day in 24 hour format
- mm: 2 digit minutes per hour
- SS: 2 digit seconds per minute
All other characters are interpreted as separators. TO_TIMESTAMP doesn't check if the separators actually match. TO_TIMESTAMP just skips the separators characters.
The number of digits per field has to exactly match. For example the 2 digit month field MM has to have exactly two digits and can not have only one. In case of an mismatch the operator returns NULL and throws a warning.