Maybe,

library(lubridate)x <- ymd("2012-03-26")year(x)month(x)day(x)

Daniel Merino



2013/7/22 Mark Knecht <markknecht@gmail.com>

> Hi,
>    I've got a piece of old code I'm trying to resurrect which contains
> this function to convert R dates to TradeStation dates:
>
> function (MyDate) {
> ThisDay = day(MyDate)
> ThisMonth = month(MyDate)
> ThisYear = year(MyDate)
> TSDate = (ThisYear - 1900)*10000 + ThisMonth*100 + ThisDay
> return(TSDate)
> }
>
> However I don't have the day/month/year functions and so far haven't
> found them searching using ??day, etc.
>
> Does anyone recognize these as coming from a package that for some
> reason might not be showing up using ??-type searching?
>
> Thanks,
> Mark
>
> _______________________________________________
> R-SIG-Finance@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions
> should go.
>



-- 
Daniel

	[[alternative HTML version deleted]]

