MySQL Forums :: General :: max(DateField)+C <> max(DateField+C)


Advanced Search

max(DateField)+C <> max(DateField+C)
Posted by: Tom Byars ()
Date: January 26, 2012 03:47AM

Why does

select max(DateField)+C, max(DateField+C) from TableWithDateField;

[C an integer]

not return the same value in both columns?

select date(max(DateField))+C, max(DateField+C) from TableWithDateField;

does return the same value in both columns so does this mean max(DateField) doesn't return a date type?

I'm using MySQL (community) 5.1.

Options: ReplyQuote


Subject Written By Posted
max(DateField)+C <> max(DateField+C) Tom Byars 01/26/2012 03:47AM
Re: max(DateField)+C <> max(DateField+C) Peter Brawley 01/25/2012 10:34PM
Re: max(DateField)+C <> max(DateField+C) Rick James 01/26/2012 06:11PM
Re: max(DateField)+C <> max(DateField+C) Tom Byars 01/30/2012 02:57AM
Re: max(DateField)+C <> max(DateField+C) Peter Brawley 01/30/2012 12:12PM
Re: max(DateField)+C <> max(DateField+C) Tom Byars 02/17/2012 01:59PM
Re: max(DateField)+C <> max(DateField+C) Peter Brawley 02/17/2012 04:03PM
Re: max(DateField)+C <> max(DateField+C) Tom Byars 02/18/2012 12:33AM
Re: max(DateField)+C <> max(DateField+C) Peter Brawley 02/18/2012 10:23AM


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.