Re: Struggling with the logic

2006-07-24 Thread Martin Jespersen
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

Re: Struggling with the logic

2006-07-24 Thread Chris Sansom
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

Re: Struggling with the logic

2006-07-24 Thread Joerg Bruehe
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

RE: Struggling with the logic

2006-07-23 Thread John Berman
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

Re: Struggling with the logic

2006-07-23 Thread grok
-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

Re: Struggling with the logic

2006-07-23 Thread Nick Hill
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

Re: Struggling with the logic

2006-07-23 Thread Chris Sansom
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