MySQL Forums
Forum List  »  Newbie

Is STR_TO_DATE function doesn't work with UCS2 charset?
Posted by: Jagadish Talluri
Date: February 15, 2013 12:42AM

Dear All,

Pleaes help me with this quick query.

[Server version: 5.5.29-log MySQL Community Server (GPL)]
I am working with a table which is having default charset ucs2. One of the coloumn is varchar(64) contains datetime information.

I need to convert that varchar column to datetime in order to do some business logic. I used STR_TO_DATE function, It didn't work.
I got a NULL, with a warning code 1411 and message - Incorrect datetime value: '' for function str_to_date.

I did a quick experiment, changed the column charset to latin1. It's working.

My query is, does the function STR_TO_DATE is incompatible with ucs2 charset?
Is there any documentation available which mention about this incompatibility with certian set of charsets?(I serched this entire week and didn't find one, help me if you find one)

For some function like char_length() are mentioned as multi-byte safe.
Therefore, do I need to consider, the functions which are not mentioned the same way are incompatible with multi-byte?

Kindly help.



Edited 3 time(s). Last edit at 02/15/2013 12:50AM by Jagadish Talluri.

Options: ReplyQuote




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.