Rabu, 03 Agustus 2011

RE: [MS_AccessPros] Strange date problem

 

Dear Wonder-

If there is also a Time component in your date/time field, then you won't get
any matches unless there's a record exactly at midnight. Try this:

WHERE [DateClosed] >= #8/2/2011# And [DateClosed] < #8/3/2011#

John Viescas, author
Microsoft Office Access 2010 Inside Out
Microsoft Office Access 2007 Inside Out
Building Microsoft Access Applications
Microsoft Office Access 2003 Inside Out
SQL Queries for Mere Mortals
http://www.viescas.com/
(Paris, France)

-----Original Message-----
From: MS_Access_Professionals@yahoogroups.com
[mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of WonderBoyMI
Sent: Wednesday, August 03, 2011 4:34 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] Strange date problem

Good morning everyone;

I'm having an issue which has me banging my head against my desk (I'm sure we
all do this regularly!)

Anyway, I have a query with only two fields. [ScheduleId] and [DateClosed]

My manager wants me to make him a report showing all of the IDs from yesterday,
but when I put #8/2/2011# in criteria I get no results. However, there are IDs
from yesterday, and if I do a range that includes yesterdays date I get them.

What am I doing wrong?

------------------------------------

Yahoo! Groups Links

__._,_.___
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar