Ask Your Question
3

Is it possible for the Mysql function str_to_date(str, format) to return null?

asked 2022-05-11 11:00:00 +0000

woof gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2022-09-08 19:00:00 +0000

nofretete gravatar image

Yes, it is possible for the MySQL function strtodate(str, format) to return null.

This can happen if the input string does not match the specified format string. If the input string cannot be parsed according to the format string, the function will return null.

For example, if the format is set to '%Y-%m-%d %H:%i:%s' and the input string is 'abc', the function will return null because it cannot be parsed according to the specified format.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2022-05-11 11:00:00 +0000

Seen: 8 times

Last updated: Sep 08 '22