Frequently asked question

Can ArcMap execute queries based on date and time values in Oracle Date fields?

Last Published: February 10, 2024

Answer

Yes. Oracle provides a TO_DATE function. Use the TO_DATE function in the Select by Attribute dialog box to format date strings into date literals. The syntax for this function is:

TO_DATE(string[,'format'])

Below is an example of a properly formatted WHERE clause. This will select all records having a date/time >= 12/20/2004 2:00 PM:

MYDATE >= TO_DATE('2004-12-20 14:00:00 ','YYYY-MM-DD HH24:MI:SS')

Oracle supports a wide variety of date/time formats for query and display purposes. Consult the Oracle documentation for further information on formatting dates and times.

Article ID:000006980

Software:
  • ArcMap 8 x
  • ArcMap 9 x
  • Legacy Products

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options