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?

    Requires Free Membership to View

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'

This was first published in August 2006

Join the conversationComment

Share
Comments

    Results

    Contribute to the conversation

    All fields are required. Comments will appear at the bottom of the article.