I have a point features class in a file geodatabase, and I import into R but the Date Field (formatted as Date field) imports incorrectly (wrong year) and adds time (20:00:00). Is there anyway to correct this. This error does not occur using rgdal library in R to import the data.
How I imported the data:
library(arcgisbinding)
arc.check_product()
setwd('My Working Directory')
input<-file.path(getwd(),'OpenCrimeData.gdb','PartICrime_Projected')
open_crime<-arc.open(input)
r_open_crime<-arc.select(open_crime)
spatial_open_crime<-arc.data2sp(r_open_crime)
Simple fix: df$Date <- as.Date(df$Date,format ='%m/%d/%Y' )
This imports as text. Any other solution?