Skip to content
Prev 17110 / 398530 Next

formatting date strings

On Wed, Feb 13, 2002 at 03:47:01PM +1100, Jeremy.Whish at csiro.au wrote:
...
Step 1 - you need to read it as plain dumb text first.
In help(read.table), check out the "as.is" option.  You probably want 
as.is=TRUE
Step 2 - you need to convert the plain dumb text to a date.

R has very sophisticated date/time handling - help(DateTimeClasses)
and help(strptime) will give you a starting background.  See if this
makes sense to you once you've read that.

my.data.frame$text.dates<-strptime(my.data.frame$text.dates,"%d/%m/%y")

Cheers

Jason
Message-ID: <20020213220911.A10659@camille.indigoindustrial.co.nz>
In-Reply-To: <B657AD42D41D914FBE1C94FFE907B34701E3E6@exqld1-tw.tag.csiro.au>; from Jeremy.Whish@csiro.au on Wed, Feb 13, 2002 at 03:47:01PM +1100