similar to: Timestamp -> Date

Displaying 20 results from an estimated 300 matches similar to: "Timestamp -> Date"

2006 Feb 12
9
CSS in Views
How can I link to a CSS file in one of my view files? -- Posted via http://www.ruby-forum.com/.
2006 Feb 12
3
.empty? Method
I am using: if @post.empty? render_text "Post does not exist." end But it gives me this error: NoMethodError in Posts#view undefined method `empty?'' for #<Posts:0x39598d0> However, if the method list empty? apears and stuff so I am confused. -- Posted via http://www.ruby-forum.com/.
2009 Feb 04
4
Rails 2.2.2 to_date and to_datetime methods
In the console I see this behaviour: >> "19270412000000".to_date.methods => ["ns?", "mon", "ago", "end_of_month", "months_since", "default_inspect", "minus_without_duration", ... >> "19270412000000".to_date.class => Date >> "19270412000000".class => String >>
2012 Jun 04
13
Nested Resource Route Helpers
Hello all, I''m working on a Rails app and I have resources nested three deep - let''s call them user, project, and issues. The route helpers now look like user_project_issue_path(@user, @project, @issue). Would it make sense for Rails to guess the @user <https://github.com/user> and @project<https://github.com/project> relations from @issue
2009 Dec 30
9
Oracle adapter problem? How to fix this?
Hi, My setup is: Ruby 1.8.6 Rails 2.3.5 activerecord-oracle-adapter (1.0.0.9250) I upgraded Rails and the adapter recently and I just went through hell trying to find a problem while inserting a record in a table. Rails was giving me this error: OCIError (ORA-02289: sequence does not exist): stmt.c:539:in oci8lib.so c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:753:in `exec''
2007 Nov 02
3
Date Issues + Oracle + RoR
Hi Experts I''ve a product like this ID -> 1 Name -> Xyz Price -> 30 Created_at -> 02-NOV-07 from_date = Date.new(2, 10, 07) to_date = Date.new(2, 10, 07) @product = Product.find_by_sql("select * from products where created_at between from_date and to_date") code works perfectly, buy my issue is i dont get any data. always says no record found but if i use
2011 Feb 04
5
Date parse - month and day reversed
I am getting the month and day reversed in parsing a date. I am wondering if there is some intelligence in Ruby that knows that at the moment I am in Mexico, as the parsing is working as if I was "6/15/2008".to_date => ArgumentError: invalid date "15/6/2008".to_date => Sun, 15 Jun 2008 What I really want is my date to be understood as month/day/year. Is there a way to
2013 Jan 27
3
Package: VennDiagram. Error in draw.pairwise.venn Impossible: cross section area too large
Dear list, When I use VennDiagram package, I got a error as follow: venn.plot <- draw.pairwise.venn( area1 = 3186, area2 = 325, cross.area = 5880); Error in draw.pairwise.venn(area1 = 3186, area2 = 325, cross.area = 588) : Impossible: cross section area too large. Does anyone have suggestion? Thank you.
2006 Apr 25
1
Array of dates/times from time.now till nextweek
Hi, I would like to make @dates in my controller. I tried the following: startdate = Time.now enddate = startdate.next_week for enddate > startdate @dates << startdate startdate = startdate.tomorrow end But I get an errormessage when I check the syntax: "warning: useless use of a variable in void context" Anyone? Thanks! Steven. -- Posted via
2007 Dec 12
6
Add a month to a Date object
Howdy all, This may be the dumbest question in the world, but how can you "add one month" to a Date object? I can''t just add 30 days, because months have varying lengths. Any help would be much appreciated... Thanks! -Neal --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails:
2008 Jun 08
20
how to parse a "dd/mm/yyyy" formatted date string???
Hi, I''m stuck. How do you parse a "dd/mm/yyyy" formatted date string??? I get a date format error. Thanks in advance Greg --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to
2009 Feb 22
6
CHECK if param exists? please help
hi folks. i want to check if a param exists if not to set it to a default value for my date range filter. in my controller i have: @from_date = Date.strptime(params[:startdate],"%d/%m/%Y") @to_date = Date.strptime(params[:enddate],"%d/%m/%Y") @articles = @results.find(:all, :conditions => [ "created_at >= ? and created_at
2006 Jun 13
17
reconstituting a date
In my view code, I have <%= datetime_select "in_out", "time_in" %> which returns in params :in_out: !map:HashWithIndifferentAccess time_in(1i): "2006" time_in(2i): "6" time_in(3i): "12" time_in(4i): "20" time_in(5i): "24" and I want to save that datetime to a column in the db... if
2007 Jan 07
2
creating a list of lists
Hello, I'm trying to create a series of randomForest objects, basically in a loop like this: forests <- list(); for (level in 1:10) { # do some other things here # create a random forest forest <- randomForest( x = x.level, y = z.level, ntree = trees ); forests <- c(forests, forest); } But instead of creating a list of 10 forests, this creates a list
2005 Mar 01
1
Problems Building Ron AIX 5.2.0.0 (Solved)
Happily I got this to work, largely by trial-and-error. In hopes that this will help somebody else, my config.site ended up being: OBJECT_MODE=64 R_PAPERSIZE=letter CC=/usr/local/bin/gcc MAIN_LDFLAGS=-Wl,-brtl SHLIB_LDFLAGS=-Wl,-G Which is virtually identical to that recommended in R-admin: one of my problems was using "-W1,brtl" rather than "-W1,-brtl". This was R 2.0.1
2006 Feb 09
17
complicated finds are eating my sole
I abandoned ruby way for find_by_sql and still can''t get this... @myplacement = Placement.find_by_sql( "select * from placement where :intake_date >= beg_intake_date and :intake_date <= end_intake_date") just a simple date range...it''s killing me - If I knew how to load placement controller into irb, I could probably try out finds interactive mode... Thanks
2008 Apr 22
2
How to convert time from rss feed to another format ?
Hi, I need to parse the rss feed and use the pubDate field to generate a field in a xml file to use as an input to simile timeline. RSS returns the pubDate as : Sun Feb 24 06:33:32 UTC 2008 But I need it as a string : "Feb 24 2008 06:33:32 PST" When I do : ... @dt=feed_item.time @dt=@dt.to_date word_date=''%b %d %Y %H:%M:%S %z'' puts @dt.strftime(word_date) ...
2008 Jun 28
14
Date Field convert to Seconds since Epoch
Hi, I was wandering if anyone could help me with this problem: Right now I am using a field in my database which is of type ''Date'' (in the form dd-mm-yyyy). I would like to convert this value (for example 26-06-08) into a number of seconds since epoch or into another form so I can compare it with todays date (from Date.now) so that I can tell the difference between the two dates
2006 Mar 01
3
Convert Date to Time
Hi, How do i convert a Date to a Time?? I have a date returned from sql and i need to be able to use handy functions like next_week or beggining of week. Any help appreciated Thanks, Chris -- Posted via http://www.ruby-forum.com/.
2008 Oct 17
1
padding "bug" in lattice/levelplot
Hello, I have encountered some unexpected behaviour with levelplot that may simply be a misunderstanding on my part. If I create a levelplot from a matrix with named columns, some "padding" space appears at the top and bottom of the heatmap. Here is an example, and I've used panel.fill to make the space I'm speaking of evident (in green).