File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes SQL date Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "SQL date" Watch "SQL date" New topic

SQL date

Mike Yu
Ranch Hand

Joined: Nov 17, 2001
Posts: 175
In SQL, using CURRENT DATE, we can get the current date, for example, '2002-10-29'.
How can we get a date that is 100 days earlier than current date? (using SQL only)

Thanks,<br />Mike
Les Dsouza

Joined: Jan 29, 2002
Posts: 27
select sysdate-100 from dual;
select current_date-100 from dual;
This works in oracle.
[ October 30, 2002: Message edited by: Les Dsouza ]
I agree. Here's the link:
subject: SQL date
jQuery in Action, 3rd edition