Skip to content

date format

2 messages · bogdan romocea, Gabor Grothendieck

#
You need the day to convert to a date format. Assuming day=15:
x.date <- as.Date(paste(as.character(x),"-15",sep=""),format="%Y-%m-%d")
#
Small point but since:

- the paste function will convert its arguments to character
- as.Date will give you the format requested anyways 
- minus is the logical separator here

we could modify that to:

	as.Date(paste(d, 15, sep = "-"))
On 8/10/05, bogdan romocea <br44114 at gmail.com> wrote: