Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SQL date

 
Mike Yu
Ranch Hand
Posts: 175
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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)
 
Les Dsouza
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic