MySQL Forums
Forum List  »  Newbie

Re: Select between dates?
Posted by: Macamba .
Date: March 16, 2017 09:49AM

Peter Brawley Wrote:
-------------------------------------------------------
> Then the query needs to be debugged, eg ...

Obviously. But I did not had luck in that area.

While omitting the not required fields, the table definition is like:
CREATE TABLE projects 
	(id int primary key NOT NULL auto_increment, 
	 activity varchar(64) NOT NULL, 
	 day date, 
	 worked_time time

And the table has the following contents:
id  Activity                day          worked_time
33  'Generating Money'      '2016-04-07' '01:30:00'
34  'Yes, another project'  '2016-04-07' '00:45:00'
35  'DAOTest'               '2016-04-08' '02:15:00'


Your query resulted in:
day 	    activity 	            day between date("2017-03-13 00:00:00") and date("2017-03-14 00:00:00") 	
2016-04-07 'Generating Money 	    0
2016-04-07 'Yes, another project'   0

Options: ReplyQuote


Subject
Written By
Posted
March 14, 2017 08:09AM
March 14, 2017 09:17AM
March 16, 2017 04:29AM
March 16, 2017 05:32AM
Re: Select between dates?
March 16, 2017 09:49AM
March 16, 2017 10:22AM
March 17, 2017 04:20AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.