Timestamp: How do I extract the individual component in a timestamp field in Oracle NoSQL Database?

72 Views Asked by At

I am exploring the SQL queries on JSON documents that has a timestamp field called lastVisited.

Here's an example:

    "lastVisited" : "2020-11-21T20:33:39.8125"

My application would like to extract individual component of the timestamp. For example, we want to individually extract the year, month, day, hour, and minute.

Does Oracle NoSQL Database support functions that do that?

1

There are 1 best solutions below

1
fxx On

There are several timestamp query functions for this: year(), month() etc. See the documentation for all the details.