troubleshooting Question

Netezza SQL - get the day of the week from a field

Avatar of NumbersCub
NumbersCub asked on
DatabasesOracle DatabaseMySQL Server
4 Comments2 Solutions4138 ViewsLast Modified:
Can someone help me with the code below?  What I need is the number of the day of the week from the report_dt field so I can use it to do some aggregations later.  Basically, if its a monday, give me 1.  the data in the report_dt field is in a date format (1/1/2012) etc.

SELECT date_part('day',report_dt) as report_dt
FROM table
Senior Oracle DBA

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 2 Answers and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros