[R] R Date Time

Duncan Murdoch murdoch.duncan at gmail.com
Tue Apr 25 23:13:46 CEST 2017


On 25/04/2017 5:04 PM, 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???
>

This appears to work (though I'm not sure whether you are using MDY or 
DMY; I used DMY):

strptime("01-01-2016T14:02:23.325", format="%d-%m-%YT%H:%M:%OS")

Duncan Murdoch



More information about the R-help mailing list