aspose file tools
The moose likes JDBC and the fly likes SQL date Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "SQL date" Watch "SQL date" New topic
Author

SQL date

Mike Yu
Ranch Hand

Joined: Nov 17, 2001
Posts: 175
Hi,
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
Greenhorn

Joined: Jan 29, 2002
Posts: 27
select sysdate-100 from dual;
or
select current_date-100 from dual;
This works in oracle.
regards.
[ October 30, 2002: Message edited by: Les Dsouza ]
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: SQL date
 
Similar Threads
how to get yesterdays date using jsp
get column value in a database
current system date using sql date
Why they have named a calendar method like this?
getting current date -applets