Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- myconn <- odbcConnect(dsnName, uid, pwd)
- results <- sqlQuery(myconn, "SELECT TOP 100 MyID, MyDateTimeColumn from MyTable ORDER BY MyDateTimeColumn DESC")
- close(myconn)
- > results$MyDateTimeColumn[3]
- [1] "2013-07-01 00:01:22 PDT"
- myconn <- odbcConnect(dsnName, uid, pwd)
- bigResults <- sqlQuery(myconn, "SELECT TOP 100000 MyID, MyDateTimeColumn from MyTable ORDER BY MyDateTimeColumn DESC")
- close(myconn)
- > bigResults$MyDateTimeColumn[3]
- [1] "2013-07-01 PDT"
- >strptime(results$TriggerTime[3], "%Y-%m-%d %H:%M:%S")
- [1] "2013-07-01 00:01:22"
- >strptime(bigResults$TriggerTime[3], "%Y-%m-%d %H:%M:%S")
- [1] NA
- > dput(results[1:10,]$MyDateTimeColumn)
- structure(c(1396909903.347, 1396909894.587, 1396909430.903, 1396907996.9, 1396907590.02, 1396906077.887, 1396906071.99, 1396905537.36, 1396905531.413, 1396905231.787), class = c("POSIXct", "POSIXt"), tzone = "")
- > dput(bigResults[1:10,]$MyDateTimeColumn)
- structure(c(1396854000, 1396854000, 1396854000, 1396854000, 1396854000, 1396854000, 1396854000, 1396854000, 1396854000, 1396854000), class = c("POSIXct", "POSIXt"), tzone = "")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement