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

Manohar Reddy manu.reddy52 at gmail.com
Fri Sep 16 09:24:29 CEST 2016


Jeff,



  Thanks,my question is when I’m using strftime function in sqldf package
it’s not returning the results which has supposed to return ,now how can I
get the excat month from my sample data with strftime function through
sqldf package ?



Manu.

On Fri, Sep 16, 2016 at 11:32 AM, Jeff Newmiller <jdnewmil at dcn.davis.ca.us>
wrote:

> This question is missing pieces... the example is incomplete.
> --
> Sent from my phone. Please excuse my brevity.
>
> On September 15, 2016 9:35:45 PM PDT, Manohar Reddy <
> manu.reddy52 at gmail.com> wrote:
> >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*
> >function.
> >
> >
> >
> >Thanks in advance.
> >
> >
> >
> >Quiries :
> >
> >
> >library(scales)
> >
> ># load data:
> >log <- data.frame(Date =
> >c("2013/05/25","2013/05/28","2013/05/31","2013/06/01","
> 2013/06/02","2013/06/05","2013/06/07"),
> >  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
> >str(log)
> >
> >
> >
> >
> >
> >
> >
> >Manu.
> >
> >
> >------------------------------------------------------------------------
> >
> >______________________________________________
> >R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> >https://stat.ethz.ch/mailman/listinfo/r-help
> >PLEASE do read the posting guide
> >http://www.R-project.org/posting-guide.html
> >and provide commented, minimal, self-contained, reproducible code.
>
>


-- 


Thanks,
Manohar Reddy P
+91-9705302062.

	[[alternative HTML version deleted]]



More information about the R-help mailing list