Hello Ellison,
Thanks very much!
I use the substr() and it works!
Have a great day!
Cheers,
Rebecca
-Original Message-
From: S Ellison [mailto:s.elli...@lgcgroup.com]
Sent: Wednesday, January 16, 2013 1:35 PM
To: Yuan, Rebecca; R help
Subject: RE: How to cut the time format short
> I have a time format looks like
> 31JAN2002:00:00:00.000
> How could I cut it to
> 31JAN2002
You have several options depending on what form the data are in.
Assuming it is character data, you could use substr:
substr("31JAN2002:00:00:00.000", 1, 9)
or gsub:
gsub("(.{9}).+", "\\1", "31JAN
Hello all,
I have a time format looks like
31JAN2002:00:00:00.000
How could I cut it to
31JAN2002
?
I tried with format() but not work.
Thanks,
Rebecca
--
This message, and any attachments, is for the intended r...{{droppe
3 matches
Mail list logo