You are here:

Oracle/Printing date

Advertisement


Question
Dear Expert ,


I am running basic SQL queries to fetch records in last 7 days using command

WHERE (((Naveen.Audited_on) Between DateAdd('d',-6,Date()) And Date()))

1.End user don't know for which dates data has been pulled , so is there any way i can modify this to print for which dates data has been pulled.

2. is there any way in which I can print the week number as well?
Thanks

Answer
Hello Navin,

Sorry for the late reply.

I think you are using SQL Server and not Oracle. Hence I am not so sure about the DateAdd function.

But you can check this link which will help you in displaying the date as well as the week number (ww).

http://www.mssqltips.com/sqlservertip/2509/add-and-subtract-dates-using-dateadd-

Hope this helps.

Regards

Suchitra

Oracle

All Answers


Answers by Expert:


Ask Experts

Volunteer


Suchitra Joshi

Expertise

I can answer questions regarding SQL, PL/SQL, Procedures, Functions, Triggers, SQL Loader, Oracle Forms, Oracle Reports, and some basic dba and performance tuning activities.

Experience

15+ years of Oracle PL/SQL Development

Education/Credentials
B.Sc (Electronics), Diploma in Computer Applications (DCA)

Awards and Honors
Oracle PL/SQL Developer Certified Associate (OCA)
Oracle Database: SQL Certified Expert
Brainbench certifications in Oracle Administration, PL/SQL, Developer 2000

©2016 About.com. All rights reserved.