Reputation: 949
I'm importing an rss feed into MySQL 5.1 via wget and LOAD DATA INFILE.
This is all working well, but, I'm having problems converting the date & time in the rss feed to a datetime col in mysql.
An example date from the feed is:
Sat, 19 Jan 2013 11:10:19 GMT
Any ideas how I can cast or convert this?
Thanks
J.
Upvotes: 1
Views: 95
Reputation: 263723
use STR_TO_DATE
SELECT STR_TO_DATE(DATE_STRING,'%a, %d %b %Y %h:%i:%s')
OTHER SOURCE
Upvotes: 1
Reputation: 14361
How about this? using str_to_Date
:
STR_TO_DATE('rss_date', '%y-%m-%d')
Upvotes: 2