copy_to() of sparklyr lib returning previous date

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

copy_to() of sparklyr lib returning previous date

I am trying to convert date from string to date format using R with as shown below:
dfTest <- data.frame(StringDate=c("2020-12-01","2020-12-02"),
StringDate DateDate
1 2020-12-01 2020-12-01
2 2020-12-02 2020-12-02

The above command gives desired output:

but when i use copy_to() as shown below , previous date are returned which
is very strange:

sdfTest <- copy_to(sc, dfTest)
#Source: spark [?? x 2]
StringDate DateDate

1 2020-12-01 2020-11-30
2 2020-12-02 2020-12-01

Sent from:

To unsubscribe e-mail: [hidden email]