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

Show records between Start & End Dates

Status
Not open for further replies.

epoh

IS-IT--Management
May 8, 2006
73
US
How can I show a record that the date/time is between two dates/times?

For example a database showing when an item should be shipped.

CurrentDate = 7/13/2006

StartDT = 7/10/2006 (Order can ship as early as now)
EndDT = 7/20/2006 (Order must ship immediately)

How can I pull up orders that can ship from within the date range provided?

Thanks
 
If the start and end dates are database fields, then try a record selection formula like:

currentdate in {table.start} to {table.end}

-LB
 
Also helpfull is if the start and the end date has to be included as well, then the formula which can be uses is:

currentdate >= {table.start} and
currentdate <= {table.end}
 
Dimst--Your formula and mine would return the same results.

-LB
 
Thanks lbass that worked!!
 
lbass:

I have experienced that sometimes using the formula ... in .. to ... not includes the start and enddate with a preview; that's why i use (most of the time) the formula ... >= ... and ... <= ...

(or is there something that i maybe do not know?)

-
 
Not sure what you mean by preview. "In-to" includes the enddate. If you use "to_" the end date would be excluded. I have had issues where a datetime when compared to a date excludes times after midnight, but then you can use:

{table.datetime} < {?enddate} + 1

where {?enddate} is a date parameter.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top