[R] stfrtime function not returning proper results through sqldf package in R

Manohar Reddy manu.reddy52 at gmail.com
Fri Sep 16 06:35:45 CEST 2016

Hi ,

  I have data something looks like below (or PFA), but when I’m extracting
month  using *strftime*  function through *sqldf* library ,it’s returning
below results but it’s not returning exact results ,it supposed to return
 05,05,05,06,06,06.Can anyone please guide me how to do that with *strftime*

Thanks in advance.

Quiries :


# load data:
log <- data.frame(Date =
  Quantity = c(9,1,15,4,5,17,18))

# convert date variable from factor to date format:
log$Date <- as.Date(log$Date,
  "%Y/%m/%d") # tabulate all the options here

-------------- next part --------------
A non-text attachment was scrubbed...
Name: strftime_sqldf_screenshot.PNG
Type: image/png
Size: 28620 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20160916/099a3c19/attachment.png>

More information about the R-help mailing list