On 25 April 2017 at 16:04, Jeff Reichman wrote:
| R Users
| 
| Having problems converting the following DTG into an R recognized date/time
| field
| 
| 01-01-2016T14:02:23.325
| 
| Would I separate it into a date field and time filed then put it back
| together???

The anytime package (on CRAN) does this (and other date or datetime input
variants) without requiring a format:

  R> library(anytime)
  R> anytime("01-01-2016T14:02:23.325")
  [1] "2016-01-01 14:02:23.325 CST"
  R>

Dirk

-- 
http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to