search for: date_range

Displaying 6 results from an estimated 6 matches for "date_range".

2012 Jan 22
4
undefined method `gsub!' for 2012-01-22 17:00:00 -0500..2012-01-23 00:00:00 -0500:Chronic::Span
Hey all, I am getting this error: NoMethodError (undefined method `gsub!'' for 2012-01-22 17:00:00 -0500..2012-01-23 00:00:00 -0500:Chronic::Span): in this code: date_range = Chronic.parse(the_date, :guess => false) reports.sum_distance_by_date(date_range).each do |d| u[:m] << d end def self.sum_distance_by_date(time) time = time ? Date.parse(time) : Date.today.to_s reports = find_by_sql(["...
2008 Jun 24
10
Question on passing arguments inside a view.
...two Models on a legacy database and only one controller called editorials with two actions index and display. I''m trying to pass in a parameter from the results of my search and getting the above error. Example: two tables one is editorial the other fp_directory Editorial Model def self.date_range(from,to) find(:all, :conditions => {:expiration_date => from..to }, :order => ''expiration_date DESC'') end Directory Model def self.full_path(directoryid) find(:all, :conditions => { :j15c_directory_id => "#{directory_id}" }) end I have...
2007 Nov 13
1
Cleaning database: grep()? apply()?
Dear R users, I have a huge database and I need to adjust it somewhat. Here is a very little cut out from database: CODE NAME DATE DATA1 4813 ADVANCED TELECOM 1987 0.013 3845 ADVANCED THERAPEUTIC SYS LTD 1987 10.1 3845 ADVANCED THERAPEUTIC SYS LTD 1989 2.463 3845 ADVANCED THERAPEUTIC SYS LTD 1988 1.563 2836 ADVANCED TISSUE
2011 Aug 26
2
how to convert Date to this json format
Hi I have to create a json date like {"startDate":"\/Date(1291145744713-0700)\/","endDate":"\/Date(1293824144713-0700)\/"} This is just an example. My case startdate = Time.now-2.day enddate = Time.now I dont know how to convert this to the above format. Please help Thanks -- Posted via http://www.ruby-forum.com/. -- You
2017 Aug 24
3
dmarc report faild ?
...il problems. Regards Mauri <?xml version="1.0" encoding="UTF-8" ?> <feedback> <report_metadata> <org_name></org_name> <email>mreport at vmfacility.fr</email> <report_id>caloro.ch:1503564302</report_id> <date_range> <begin>1503477902</begin> <end>1503564302</end> </date_range> </report_metadata> <policy_published> <domain>caloro.ch</domain> <adkim>s</adkim> <aspf>s</aspf> <p>none</p> <sp...
2012 Jan 01
4
Chronic parsing date range in console but not in application in rails 3
Hey all, Chronic will parse a date range in console: Chronic.parse(1/1/2011 - 1/1/2012, :guess => false) => 2012-01-01 12:00:00 -0500..2012-01-01 12:00:01 -0500 However, when I use logger to check if it''s parsing in application, it is not: logger.info "The value of history date is #{history_date}" => The value of history date is 1/1/2011 - 1/1/2012