[R] Dates in Windows

From: Tom McCallum <termcc_at_googlemail.com>
Date: Thu, 14 Jun 2007 11:22:45 +0100


Hi everyone,

When using R on Linux I can do the following:

> x <- as.Date("01/04/2007", "%d/%m/%Y");
> x

[1] "2007-04-01"
> print(format(x, "%s"));

[1] "1175385600"

When using R in Windows XP though the format "%s" does nothing but return a blank string. How can I convert a date to the number of seconds since 1970 in Windows?

Cheers

Tom



R-help_at_stat.math.ethz.ch 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. Received on Thu 14 Jun 2007 - 10:30:54 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 14 Jun 2007 - 11:31:54 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.