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
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 [[...]]
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,
choose to store it as a varchar use:
Select * from submissions where approvedate in ('07/01/2006',
'07/02/2006', '07/03/2006',...);
Be aware how extremely slow this performs compared to the options
mentioned above tho.
John Berman wrote:
Hi
I'm struggling with some logic
I have
Hi
I'm struggling with some logic
I have a table called: submissions and each record has an approvedate field
which stores the date mm/dd/
I want to display all records for 7 days only from their approved date so I
guess something like
Select * from submissions were
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
to select date ranges and perform other date
calculations, save the date as a unix date number then convert to human
readable form as necessary.
John Berman wrote:
Hi
I'm struggling with some logic
I have a table called: submissions and each record has an approvedate field
which stores
-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 can