RE: Searching for Date

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



em,\
one way to solve such problem is the following:

SELECT * FROM APPOINTMENTS
WHERE (APPOINTMENTDATE >= Convert(Datetime, '2005-12-25 00:00:00', 102))
AND (APPOINTMENTDATE <= Convert(Datetime,
'2005-12-25 23:59:59', 102))

Mario Aoun

"em" wrote:

> Hi All,
>
> I'm having trouble searching by date value in a DATETIME field.
>
> If there is no time specified I can find the date fine, for example,
> SELECT * FROM APPOINTMENTS WHERE APPOINTMENTDATE='12-25-2005'
>
> But if APPOINTMENTDATE has a time specified, such as "12-25-2005 13:10:00",
> then the above query won't find it.
>
> So how can I find all rows that are on 12-25-2005 regardless of the time?
>
> Cheers
>
>
>
.



Relevant Pages

  • A lot of flat tree or taxi, and shell backwards die everybody.
    ... If you will notice Junior's cabin under appointments, ... crossings contrast, sponsor, and tax. ... Others regardless release. ... whereby position the blast. ...
    (sci.crypt)
  • Re: Outlook Appointment Reminders
    ... I don't use Tasks, so I'm not sure how they work, but generally all-day appointments have a default 18-hour reminder, where timed appointments have a 15-minute default. ... "Susan Ramlet" wrote in message ... In OL 2003, the reminder box would pop up about a day or two ahead of time, regardless of the default timer setting of 15 minutes. ...
    (microsoft.public.office.misc)
  • How to create new task?
    ... I can create new and update existing Appointments and Contacts ... I am using Exchange 2000 and CDO. ... Prasad ... Prev by Date: ...
    (microsoft.public.exchange.development)
  • Re: Sub Calendar- Not tracking accept message
    ... accepting of the appointments. ... Robyn ... Prev by Date: ...
    (microsoft.public.outlook)
  • Re: Duplicate "calendars"
    ... Unfortunately Calendar1 is the one I want to ... It has a more complete list of appointments than the other. ... >> close listing. ... Prev by Date: ...
    (microsoft.public.outlook)