Re: [R] strftime - Dates from Excel files

2012-02-04 Thread John Kane
I think you are using the wrong function. See ?strftime Try dataset=c("1/2/1978") strptime(dataset,"%d/%m/%Y") John Kane Kingston ON Canada > -Original Message- > From: rrast...@gmail.com > Sent: Fri, 3 Feb 2012 14:34:09 +0100 > To: r-help@r-project.org

Re: [R] strftime - Dates from Excel files

2012-02-03 Thread Mikko Korpela
On 02/03/2012 03:34 PM, Ana wrote: > Hi > > I have many excel files were the Date field was not declared as date, > so the dates look like this: 1/2/1978 > I know that the format is day/month/year > > How can I make R change this to Date format? > > If I use strftime, I get wrong dates: > > dat

Re: [R] strftime - Dates from Excel files

2012-02-03 Thread Prof Brian Ripley
On Fri, 3 Feb 2012, Ana wrote: Hi I have many excel files were the Date field was not declared as date, so the dates look like this: 1/2/1978 I know that the format is day/month/year How can I make R change this to Date format? If I use strftime, I get wrong dates: So use as.Date to convert

[R] strftime - Dates from Excel files

2012-02-03 Thread Ana
Hi I have many excel files were the Date field was not declared as date, so the dates look like this: 1/2/1978 I know that the format is day/month/year How can I make R change this to Date format? If I use strftime, I get wrong dates: dataset=c("1/2/1978") strftime(dataset,"%d/%m/%Y") "19/02/0