Does one of these work for you:

> x <- as.POSIXct('2010-03-18 12:15')
> x
[1] "2010-03-18 12:15:00 EDT"
> unclass(x)
[1] 1268928900
attr(,"tzone")
[1] ""
> as.vector(x)
[1] 1268928900
>


On Thu, Mar 18, 2010 at 11:18 AM, ManInMoon <xmoon2000@googlemail.com>wrote:

>
> How do I get a number representing a date from a POSIXct i.e. removing the
> time elements?
> --
> View this message in context:
> http://n4.nabble.com/how-to-return-date-part-of-POSIXct-tp1598109p1598109.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<http://www.r-project.org/posting-guide.html>
> and provide commented, minimal, self-contained, reproducible code.
>



-- 
Jim Holtman
Cincinnati, OH
+1 513 646 9390

What is the problem that you are trying to solve?

	[[alternative HTML version deleted]]

