Q
Problem solve Get help with specific problems with your technologies, process and projects.

Datepart function in Oracle

I want to use the datepart function to get the month of my variable. Is this allowed in Oracle or am I off on the syntax?

I want to use the datepart function to get the month of my variable:
 Datepart(month,ABC_Date)
Is this allowed in Oracle or am I off on the syntax?
Oracle does not have a datepart function. But the syntax:
 Datepart(month,abc_date) = '03'
can be converted to the following in the Oracle date routine:
 to_char(abc_date,'mm') = '03'

Dig Deeper on Oracle and SQL

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide.com

SearchDataCenter

SearchContentManagement

SearchHRSoftware

Close