Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Todays Date

Status
Not open for further replies.

EscapeUK

Programmer
Jul 7, 2000
438
GB
In my select statement i have a date field how do I select items for the current date plus one day, eg tommrow
 
Create a forumla, and put the following code in:
Currentdate+1

Your done!
Bradb
 
This worked for me in the Cyrstal SQL Designer.

SELECT
eventstb."e_staff",
eventstb."e_staff_name",
eventstb."e_date"
FROM
"dharma"."eventstb" eventstb
WHERE
eventstb."e_date" = ({d '2002-03-01'}+1)

BradB
 
How do I get the current date into where you typed 2002-03-01.

Also forgot to mention it is looking at an oracle DB
 
I checked in the Help file of Crystal SQL Designer and found the CURDATE() Returns the current system date.

The following example works.
SELECT
eventstb."e_staff",
eventstb."e_staff_name",
eventstb."e_date"
FROM
"dharma"."eventstb" eventstb
WHERE
eventstb."e_date" =(CURDATE()+1)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top