convert datetime to POSIXct