TIMESTAMP function
The TIMESTAMP function returns a TIMESTAMP WITHOUT TIME ZONE value from its argument or arguments.
The rules for the arguments depend on whether you specify the second argument.
If only one argument is specified without a precision of n
The argument must be an expression that returns a value of one of the following built-in data types:
- DATE
- TIMESTAMP
- Character string representation of timestamp
A character string with an actual length of 14 represents a valid date and time in the form yyyyxxddhhmmss, where yyyy is the year, xx is the month, dd is the day, hh is the hour, mm is the minute, and ss is the seconds.
The resulting timestamp has a precision of 6.
If only one argument is specified with a precision of n
The argument must be an expression that returns a value of one of the following built-in data types:
- Date
- Timestamp
- Character string representation of timestamp
The resulting timestamp has a precision of n, where n is between 0 and 12 inclusive.
If both arguments are specified
The first argument must be an expression that returns a value of one of the following built-in data types:
- Date
- Timestamp
- Character string representation of timestamp
The second argument must be an expression that returns a value of one of the following built-in data types:
- Time
- Character string representation of time