Re: [R] strftime

2013-05-16 Thread David Winsemius
On May 16, 2013, at 10:43 AM, Dominic Roye wrote: > Hello, > > I'm a little surprised about the result of strftime for my data. > >> str(time) > chr [1:315504] "2006-01-01 00:10:00" "2006-01-01 00:20:00" "2006-01-01 > 00:30:00" ... > >> str(strftime(time,format="%Y-%m-%d %H:%M:%S")) > chr [1:3

[R] strftime

2013-05-16 Thread Dominic Roye
Hello, I'm a little surprised about the result of strftime for my data. > str(time) chr [1:315504] "2006-01-01 00:10:00" "2006-01-01 00:20:00" "2006-01-01 00:30:00" ... > str(strftime(time,format="%Y-%m-%d %H:%M:%S")) chr [1:315504] "2006-01-01 00:00:00" "2006-01-01 00:00:00" "2006-01-01 00:00

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

Re: [R] strftime vs strptime ??

2010-10-29 Thread David Winsemius
On Oct 29, 2010, at 6:55 AM, skan wrote: Hello Could anyone explain me the difference between strftime vs strptime, please ? I've read the help but it's a little bit cionfusing for me. You should focus on the "Value" section of the help page. They return vectors of different classes.

Re: [R] strftime vs strptime ??

2010-10-29 Thread Prof Brian Ripley
strptime() takes a character vector and makes a date-time object. That is input. strftime() takes a date-time object and makes an character vector. That is output, and it is normally called via format() or print(). Let's see what the help says (slightly edited to refer just to these two): Da

[R] strftime vs strptime ??

2010-10-29 Thread skan
Hello Could anyone explain me the difference between strftime vs strptime, please ? I've read the help but it's a little bit cionfusing for me. cheers -- View this message in context: http://r.789695.n4.nabble.com/strftime-vs-strptime-tp3018865p3018865.html Sent from the R help mailing list