How to deal with unwanted characters in date with strptime in R
I have been sent many datasets with the date in the following format:
10.18.12 klo 04.00.00 ap.
10.18.12 klo 04.00.00 ip.
The dates are in Finnish. 'klo' is for time, ap. is for 'am' and ip. is
for 'pm'. I am trying to read it with strptime but I can't see how to deal
with unwanted characters like "klo", nor how I can tell strptime that what
ap and ip stand for. I thought that something like this might work
time = strptime(paste(date),format='%m.%d.%y%n%n%n%n%n%I.%M%S%n%p%n')
because I thought that I could define unwanted characters as white space
but it doesn't work. Any advice?
Thanks.
No comments:
Post a Comment