I am new to R and am terrible with handling dates. The following date is returned from a query to the Twitter search API and is stored as a character string in a my dataframe.<
From the help(strptime)
:
> Sys.setlocale("LC_TIME", "C")
[1] "C"
> strptime("Tue, 23 Mar 2010 14:36:38 -0400",
+ "%a, %d %b %Y %H:%M:%S %z",
+ tz="GMT")
[1] "2010-03-23 18:36:38 GMT"
Be careful about the locale: if you don't reset it to C
, the function will try to parse weekday and month abbreviations as localized.