View Single Post
Old 10-15-2012, 08:00 PM   PM User | #1
WolfShade
Regular Coder

 
Join Date: Apr 2012
Location: St. Louis, MO, USA
Posts: 950
Thanks: 7
Thanked 98 Times in 98 Posts
WolfShade is an unknown quantity at this point
ORACLE: DatePart??

Hey, everyone.

Been scouring Google, looking for an ORACLE equivalent to SQL Server "DatePart". I found one thing, and it's not working:

Code:
SELECT ...
FROM ...
WHERE DatePart(tbl.DateField,DP_YEAR) = 2012
I keep getting a "DATEPART: invalid identifier" message. This is Oracle 10g.

Does anyone know the proper way to compare the year portion of a date to a value like "2012"?

Thank you,
__________________
^_^

If anyone knows of a website that can offer ColdFusion help that isn't controlled by neurotic, pedantic jerks* (stackoverflow.com), please PM me with a link.
*
The neurotic, pedantic jerks are not the owners; just the people who are in control of the "popularity contest".
WolfShade is offline   Reply With Quote