Re: DATETIME question

2004-05-26 Thread Robert A. Rosenberg
At 11:01 +0300 on 05/26/2004, Egor Egorov wrote about Re: DATETIME question: John Mistler <[EMAIL PROTECTED]> wrote: Given a column DATETIMEcolumn (-MM-DD HH:MM:SS), is there a SELECT statement that will: select all entries whose (TIME) of DATETIMEcolumn is BETWEEN 'HH:MM:SS'

RE: DATETIME question

2004-05-26 Thread Victor Pendleton
Use the time_format function. -Original Message- From: John Mistler To: [EMAIL PROTECTED] Sent: 5/26/04 1:15 AM Subject: DATETIME question Given a column DATETIMEcolumn (-MM-DD HH:MM:SS), is there a SELECT statement that will: select all entries whose (TIME) of DATETIMEcolumn is

Re: DATETIME question

2004-05-26 Thread Egor Egorov
John Mistler <[EMAIL PROTECTED]> wrote: > Given a column DATETIMEcolumn (-MM-DD HH:MM:SS), is there a SELECT > statement that will: > > select all entries whose (TIME) of DATETIMEcolumn is BETWEEN 'HH:MM:SS' AND > 'HH:MM:SS', but whose (DATE) is anything? > SELECT .. FROM t1 WHERE DATE_FORMA

DATETIME question

2004-05-25 Thread John Mistler
Given a column DATETIMEcolumn (-MM-DD HH:MM:SS), is there a SELECT statement that will: select all entries whose (TIME) of DATETIMEcolumn is BETWEEN 'HH:MM:SS' AND 'HH:MM:SS', but whose (DATE) is anything? Thanks, John -- MySQL General Mailing List For list archives: http://lists.mysql.co

DISTINCT DATETIME question

2004-05-05 Thread Ron Gilbert
I am trying to get a distinct dates (not time) from a column. I am currently doing this: SELECT DISTINCT DATE_FORMAT(DateAdded, '%Y-%m-%d') FROM Bla Is this the best way to be doing this? Seems very inefficient do to the call to DATE_FORMAT for every row. Is there a way to have a query only