As mentioned before you really should sue the date data type in mysql,
or alternativly use an int and store the date as seconds since the epox,
so that you can do simple math for this type of query. Any other way of
storing dates is basically shooting yourself in the foot.
That said, if you ch
At 17:31 -0700 23/7/06, [EMAIL PROTECTED] wrote:
The logic is that it follows the natural spoken format, i.e.
"July 23, 2006"; which became the written standard; which...
Hmmm. Is 'July the 23rd, 2006' any more natural to say than 'the 23rd
of July, 2006'? I think we probably say either, equal
Hi Chris, John all!
Chris' explanation is nearly correct:
Chris Sansom wrote:
At 15:43 +0100 23/7/06, John Berman wrote:
I have a table called: submissions and each record has an approvedate
field
which stores the date mm/dd/
Why? If you're storing the date in this format [[...]]
Joh
Thanks to all for the responses, as always problem now solved and I learnt a
few things.
Regards
John Berman
-Original Message-
From: Chris Sansom [mailto:[EMAIL PROTECTED]
Sent: 23 July 2006 16:02
To: [EMAIL PROTECTED]; mysql@lists.mysql.com
Subject: Re: Struggling with the logic
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
> For what it's worth, the standard American date format of
> mm/dd/ has always mystified me, as it's the least
> logical possible way to do it. The SQL format - in
> decreasing order of unit size - is of course the most
> logical way because you
Hello John
There are two approaches to this.
1) Best, save date into table as a number. Select date like
WHERE date>=$date1 AND date<=$date2
2)Otherwise, if storing dates a strings:
WHERE date=$date1 OR date=$date2 OR date=$date3 OR date=$date4 OR
date=$date5.
In general, if you want to
At 15:43 +0100 23/7/06, John Berman wrote:
I have a table called: submissions and each record has an approvedate field
which stores the date mm/dd/
Why? If you're storing the date in this format you can only be
storing it as a string (char, varchar or text), so no wonder you're
having tro