MySQL Forums
Forum List  »  General

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)
January 26, 2012 03:47AM


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.