The type depends on where the value you want to paste comes from. If you want to insert the current time, you can use CURRENT_TIMESTAMP
as shown in other answers (or SYSTIMESTAMP
).
If you have time as a string and want to convert it to a timestamp, use an expression like
to_timestamp(:timestamp_as_string,'MM/DD/YYYY HH24:MI:SS.FF3')
I hope that the components of the time format speak for themselves, except that FF3
means 3 digits accurate to the second. You can achieve 6 digits of accuracy.
If you paste from an application, the best answer may depend on how the date / time value is stored in your language. For example, you can map specific Java objects directly to a TIMESTAMP
column, but you need to understand JDBC
type mappings.
Dave Costa Mar 24 2018-11-21T00: 00Z
source share