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

Format Issue Searching Date in Table 1

Status
Not open for further replies.

diwin

Technical User
Joined
Nov 29, 2002
Messages
218
Location
CA
The format of the donationEntryDate is... "Short Date" and appears in the table as... 7/28/2005, although the time is stored as well because it is entered as... now(). In my date textbox (txtSearchDateStart) on the form for searching this table, I can enter a date only by 2-clicking on the Microsoft Calendar Control 10.0 (MSCAL.OCX).

The format of the Me.txtSearchDateStart is...
ddd", "mmm-dd-yyyy.

I format the contents of Me.txtSearchDateStart as follows for the search SQL string...
datDate1 = "FormatDateTime(Me.txtSearchDateStart, vbShortDate)"
...so that it appears like 8/14/2005.

So then my search string reads...
"SELECT * FROM qryDonationSearchOutput WHERE donationEntryDate = #7/29/2005# ORDER BY donationID DESC"

So , since I use the "=" operator (aside: Is that okay or should I always use LIKE? I still don't understand "LIKE" fully.), I don't get a match for the same date. I DO get a match for the same date/time. How can I force the date in the table to be read as just the date, and not as date AND time???




Daniel Dillon
 
And this ?
WHERE Int(donationEntryDate) = ...

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Oops...wrong forum.

Sorrry, but I will re-post in...

Microsoft: Access Modules (VBA Coding)

Daniel Dillon
 
Thanks PHV.

What is INT???

Daniel Dillon
 
Not re-posted in the other forum.

Daniel Dillon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top