MySQL Forums
Forum List  »  Newbie

Re: IfNull and Date Formats
Posted by: Derek McKinnon
Date: June 10, 2018 05:11PM

I have read the documentation.

Specifically
https://dev.mysql.com/doc/refman/8.0/en/date-and-time-literals.html

which states that yyyymmdd will be recognised as a date as long as it is valid and it is expecting a date.

What I'm interpreting your comment to me is that the IfNull statement somehow stops MySQL recognising it as a date, even though it is being compared to a date field.

Personally I think this is a big enough variation from the documentation that the documentation should have included a paragraph on this exception. And that also leaves two other questions.
1) What other functions change the interpretations of the types that we don't realise.
2) Can I even trust that '2018-06-10' will be correctly interpreted by all functions?

At the end of the day I simply need a format that will always be understood to be a date in MySQL, no matter what function is being utilised.

Thanks
Derek

Options: ReplyQuote


Subject
Written By
Posted
June 07, 2018 07:16PM
Re: IfNull and Date Formats
June 10, 2018 05:11PM


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.