[R] date and time conversion

2012-05-02 Thread mpostje
Hi I've been trying to convert numbers from an online temperature database into dates and time that R recognizes. the problem is that the database has put a T between the numbers and R will not accept any conversions. this is the format that it's in now 1981-01-02T08:00 can anyone help?

Re: [R] date and time conversion

2012-05-02 Thread R. Michael Weylandt
Quick and dirty solution is to use sub() to change the T to a space and then use as.POSIXct as usual. x - 1981-01-02T08:00 as.POSIXct(sub(T, , x), format = %Y-%m-%d %H:%M) but it does look to me like R can work around the T if you give a good format argument: as.POSIXct(x, format =

Re: [R] date and time conversion

2012-05-02 Thread Rui Barradas
Hello, mpostje wrote Hi I've been trying to convert numbers from an online temperature database into dates and time that R recognizes. the problem is that the database has put a T between the numbers and R will not accept any conversions. this is the format that it's in now