Re: [R] Date conversion issue

2010-03-18 Thread ManInMoon

Thanks - that works
-- 
View this message in context: 
http://n4.nabble.com/Date-conversion-issue-tp1596548p1597627.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Date conversion issue

2010-03-17 Thread ManInMoon

I am parsing dates as follows:

 z[1:10,1:3]
V1   V2   V3
10 03/02/09 22:20:51.274
2  100 03/02/09 22:28:18.801
3  200 03/02/09 22:33:33.762
4  300 03/02/09 22:40:21.826
5  400 03/02/09 22:41:38.361
6  500 03/02/09 22:42:50.882
7  600 03/02/09 22:45:19.885
8  700 03/02/09 22:48:55.558
9  800 03/02/09 22:51:21.112
10 900 03/02/09 22:58:41.860

zdates-as.POSIXct(strptime(paste(z[,2],z[,3]), %d/%m/%Y
%H:%M:%OS),origin=1970-01-01 );

 head(zdates)
[1] 0009-02-03 22:20:51 GMT 0009-02-03 22:28:19 GMT 0009-02-03 22:33:34
GMT
[4] 0009-02-03 22:40:22 GMT 0009-02-03 22:41:38 GMT 0009-02-03 22:42:51
GMT


Can anyone tell me why I see YEAR as 0009 instead of 2009?


-- 
View this message in context: 
http://n4.nabble.com/Date-conversion-issue-tp1596548p1596548.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Date conversion issue

2010-03-17 Thread ManInMoon

Sorry
-- 
View this message in context: 
http://n4.nabble.com/Date-conversion-issue-tp1596548p1596880.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Date conversion issue

2010-03-17 Thread Henrique Dallazuanna
Use %y indeed of %Y.

On Wed, Mar 17, 2010 at 12:00 PM, ManInMoon xmoon2...@googlemail.com wrote:

 I am parsing dates as follows:

 z[1:10,1:3]
    V1       V2           V3
 1    0 03/02/09 22:20:51.274
 2  100 03/02/09 22:28:18.801
 3  200 03/02/09 22:33:33.762
 4  300 03/02/09 22:40:21.826
 5  400 03/02/09 22:41:38.361
 6  500 03/02/09 22:42:50.882
 7  600 03/02/09 22:45:19.885
 8  700 03/02/09 22:48:55.558
 9  800 03/02/09 22:51:21.112
 10 900 03/02/09 22:58:41.860

zdates-as.POSIXct(strptime(paste(z[,2],z[,3]), %d/%m/%Y
 %H:%M:%OS),origin=1970-01-01 );

 head(zdates)
 [1] 0009-02-03 22:20:51 GMT 0009-02-03 22:28:19 GMT 0009-02-03 22:33:34
 GMT
 [4] 0009-02-03 22:40:22 GMT 0009-02-03 22:41:38 GMT 0009-02-03 22:42:51
 GMT


 Can anyone tell me why I see YEAR as 0009 instead of 2009?


 --
 View this message in context: 
 http://n4.nabble.com/Date-conversion-issue-tp1596548p1596548.html
 Sent from the R help mailing list archive at Nabble.com.

 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.




-- 
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40 S 49° 16' 22 O

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.