similar to: Date Field convert to Seconds since Epoch

Displaying 20 results from an estimated 2000 matches similar to: "Date Field convert to Seconds since Epoch"

2003 Apr 20
4
${EPOCH} and ${DATETIME} patch
Skipped content of type multipart/alternative-------------- next part -------------- Index: pbx.c =================================================================== RCS file: /usr/cvsroot/asterisk/pbx.c,v retrieving revision 1.14 diff -u -r1.14 pbx.c --- pbx.c 19 Apr 2003 02:41:22 -0000 1.14 +++ pbx.c 21 Apr 2003 02:27:43 -0000 @@ -713,6 +713,8 @@ { char *first,*second; char tmpvar[80] =
2006 Jan 22
8
Date Calculation
I am trying to calculate the number of days between 2 dates using Time.now - object.date where object.date is a date pulled from a database. I want to display the age of the entry in the database in days. I keep getting an error about not being able to convert a date into a float. What am I doing wrong. If I use object.date - object.date it seems to work but the answer is useless (0). I
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/.
2004 Jul 07
9
Windows 2K outperform Linux/Samba very much?
Hi, all: I want to check small files' property(such as date, path, and so on) frequently. The files are stored in netwrok driver and their sizes vary from 2KB to 5KB. I found that Windows 2K outperform Linux/Samba very much after I campared the bench results. I am very confused about it and who can explain it? The computers' configurations are as follows: 1. PC Client It
2006 Jan 21
4
Migrations and Time datatype. Bug?
I''ve defined a table with these columns t.column "some_date", :date, :null => false t.column "some_time", :time, :null => false The result in schema.rb is t.column "some_date", :date, :null => false t.column "some_time", :time, :default => Sat Jan 01 00:00:00 GMT Standard Time 2000, :null => false The time column generates a
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 >>
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''
2014 Jun 19
2
About memory index/search in multithread program
hi, Why xapian don't support memory index/search ? I know there is a method can create memory datebase, like this: Xapian::WritableDatabase db(Xapian::InMemory::open()); *But, if i use these in multithread program, i need create many datebases!!* Xapian::WritableDatabase db1(Xapian::InMemory::open()); //used in thread1 Xapian::WritableDatabase db2(Xapian::InMemory::open()); //used in
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
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:
2006 Jun 06
4
change 1-06-2006 to 1st July 2006 (date formatting)
Hi, I have a few dates coming from the datebase in the format ''DD-MM-YYYY'' How can I change this in to a more human readable format? such as 1st July 2006 Thanks Scott -- Posted via http://www.ruby-forum.com/.
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
2006 Mar 14
21
Changing default date format in Rails
I''ve spent all day digging through the rails api and postgres-pr on this, I think it''s time to ask the list. Postgres stores a Date in YYYY-MM-DD format. My users want the dates in MM/DD/YYYY format. Sure, I could explicitly convert it on the app level every place where a date is displayed, but that seemed like a DRY violation. I thought I''d be clever and simply
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 Nov 10
3
Runt Recurring events
I am planning on using Runt to calculate recurring events. I calculate a Runt object in the view and use it to see if it includes a certain date, which is populates from the database, and display the info for that date if it is included. I have recurring events for every week, which was pretty easy to set up. I can just say: r = Runt::DIWeek.new(4) For a recurring event every Thursday, and
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) ...