Not really used to getting knee deep in complex queries, but need to build a trigger to take a date in a format like "10 de febrero de 2014" into a usable date format. It seems the str_to_date function will not recognize month names in anything other than the set language for lc_time_names global. The database configuration cannot really be changed as other tables and columns depend on it.
Anyone have any suggestions, on how to actually get it to work?
I'm going to add this to a trigger, so that when data is inserted by a different process it can convert the dates automatically and make them more searchable, and accionable since I need to have a cron check every so often when something has expired via these dates.
Any help is appreciated.
Current query if it helps. It currently returns Null since it cannot identify the spanish month name:
----------------------------------
Phil AKA Vacunita
----------------------------------
OS-ception: Running Linux on a Virtual Machine in Windows which itself is running in a Virtual Machine on Mac OSx.
Web & Tech
Anyone have any suggestions, on how to actually get it to work?
I'm going to add this to a trigger, so that when data is inserted by a different process it can convert the dates automatically and make them more searchable, and accionable since I need to have a cron check every so often when something has expired via these dates.
Any help is appreciated.
Current query if it helps. It currently returns Null since it cannot identify the spanish month name:
Code:
SELECT STR_TO_DATE("10 de febrero de 2014","%d de %M de %Y") AS mydate;
----------------------------------
Phil AKA Vacunita
----------------------------------
OS-ception: Running Linux on a Virtual Machine in Windows which itself is running in a Virtual Machine on Mac OSx.
Web & Tech