so I have to insert a bunch of records from a data source that has dates in the format
Sun, Sep 13 1:00 PM.
I’m just going to execute SQL that uses
STR_TO_DATE
But I was wondering in case I need it in the future if you guys know of a way to do this using a ruby method…like a reverse strftime
Yes, look at
Datetime.strptimeand the nearbyDatetime.parse(similar methods for Date).Pretty much any language that uses the C strftime will have strptime as well.