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!

Statistics Report - Pull info. entered today?

Status
Not open for further replies.

SherryLynn

Technical User
Feb 4, 2001
171
CA
I have a report with date parameters (start and end). Is there some way to pull only those records which had data entered on todays date? or yesterdays? Help.

Sherry
 
For today, set [start] = Date() or Format(Now, "Short Date") and [end] = Date() + 1 (or Format (Now() + 1, "Short Date")

Variations on this theme should be pretty obvious.

The 'trick' here is to understand that "dates" are stored as Double type, witht the integer (long) part as the offset from a starting date and the decimal part reresenting the time (actually proportion of the day). Now is th e whole thing (Integer and decimal). Date is JUST the integer.

Consider the following:

? Clng(Now)
37062
? Format(Now, "Long Time")
12:43:59 PM
? Format(Now, "Short Time")
12:44
? Cdbl(now)
37061.5305671296
? Date()
6/19/01
? Date + 1
6/20/01
? Date - 1
6/18/01


MichaelRed
redmsp@erols.com

There is never time to do it right but there is always time to do it over
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top