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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

query with start date; between two dates

Status
Not open for further replies.

stevesd

Technical User
Dec 26, 2000
74
US
I need to write a query that gives us a start date.
Will {Trans.TransDate} >= date (2000, 10, 20) give trans starting with Oct 20, 2000? And how to write a query that gets trans with TransDate between two specific dates?
 
Assuming that you are building the record selection formula to pass to the report

1.
"{Trans.TransDate} >= date(2000,10,20)"
will get you all records statring with 10/20/2000

2.
"{Trans.TransDate} in date(2000, 10, 20) to date(2000,12,20)"
and you get all records falling into this range of dates.

Make sure that {Trans.TransDate} is Date data type
 
Just to add emphasis to the last point of LV, not all databases have a date datatype (eg MS SQL Server has only datetime types), and quite often date fields in other databases are actually datetime. So be sure to check ;-) Malcolm Wynden
I'm for sale at malcolm@wynden.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top