Re: date dilemmas

by "Stuart McDonald" <stuart(at)fourelephants.com>

 Date:  Mon, 7 Aug 2000 17:08:04 +0700
 To:  "jalal" <the_jalal(at)yahoo.com>
 Cc:  <hwg-techniques(at)hwg.org>
 References:  westhost
  todo: View Thread, Original

Hi Jalal,

If I use
....WHERE s.Date='$today' or
....WHERE s.Date='#$today#'
I get a Data type mismatch in criteria expression., SQL state 22005

If I use
.....WHERE s.Date=#$today#

Then I get no error but nothing matches either!!

In the Access DB the date is set as a Date?text field in a short date format
and PHP picks todays date and formats it as:
  $today= date("d/m/y",time());

I've been looking at this all day and have tried so many things my brain is
really starting to burn, so I think there is something obvious going wrong
that I have overlooked as I wouldn't have thought this would be very
complicated.

Thanks for you help

Stuart


----- Original Message -----
From: jalal <the_jalal(at)yahoo.com>
To: <hwg-techniques(at)hwg.org>; Stuart McDonald <stuart(at)fourelephants.com>
Sent: Monday, August 07, 2000 4:24 PM
Subject: Re: date dilemmas


> On Mon, 7 Aug 2000 14:54:40 +0700, Stuart McDonald wrote:
>
> >e.Date='#$today'");
> >
>
> Have you tried:
>
> e.Date='#$today#'");
>
> The above format is used for accessing dates, but from the format
> string, is it possible that you have the dates stored as strings in the
> DB? In which case you will need to access them as strings:
>
> e.Date='$today' ");
>
> Not very efficient...
>
> >
> >$today= (date ("l, d F, Y"));
>
> This format string will return "Friday, 10 March, 1999" (e.g.) and I'm
> not sure Access will understand that as a date.
>
>
> HTH -- jalal --
>
>
>
>

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA