Speedup conversion of 2 million rows of date strings to POSIX.ct
I have a csv which includes about 2 million rows of date strings in the format: 2012/11/13 21:10:00 Lets call that csv$Date.and.Time I want to convert these dates (and their accompanying data) to xts as fast as possible I have written a script which performs the conversion just fine (see below), but it's terribly slow and I'd like to speed this up as much as possible. Here is my current methodology. Does anyone have any suggestions on how to make this faster? dt <- as.POSIXct(csv$Date.and.Time,tz="UTC") idx <- format(dt,tz=z,usetz=TRUE) So the script converts these date strings to POSIX.ct .