similar to: change 1-06-2006 to 1st July 2006 (date formatting)

Displaying 20 results from an estimated 2000 matches similar to: "change 1-06-2006 to 1st July 2006 (date formatting)"

2006 Jul 10
2
Formatting of dates in a text_field
When displaying a date field using a text_field object, is it possible to specify how the date will be formatted? <%= text_field ''item'', ''created_at'', {:class=>"text-input", :size=>18, :disabled=> true} produces 2006-07-07 12:00:00 I would like to reformat it to something like 07/07/2006 12:00pm -- Posted via
2006 Apr 20
7
checking date
Radrails created a field for date <%= product.date_available.strftime("%y-%m-%d") %> What does this mean? Should the definition be date or datetime? I tried both and no results Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060420/ed0cbb14/attachment.html
2006 Apr 24
3
TimeStamp conversion
Hi, I''ve got a TimeStamp field in MySql and want to use the hour and minutes in the value. for example: StartTime = Schedule.find(action2.ScheduleID).DateTimeStart.to_s That returns "Mon Feb 20 08:00:00 Romance Standard Time 2006" How do I get 08:00 returned ?? Thanks ! Steven. -- Posted via http://www.ruby-forum.com/.
2006 Jun 01
4
How do I get today''s date?
I know this is a simple question, but i just want to put the current day, month, date and year on my website. I still can''t figure out how to read the Rails API. Can anybody help me out? TIA -- Posted via http://www.ruby-forum.com/.
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
2001 Mar 14
1
[PATCH]: contrib/cygwin/README
Hi, I have a small patch here which changes the Cygwin README file so that the following fact is mentioned. OpenSSH never uses $HOME to search for user config files but the value in the pw_dir field in /etc/passwd. This might be of minor interest for generic U*X folks but that's an important fact for Cygwin users. When /etc/passwd is automatically created under WinNT/2K it uses the values
2009 Jan 28
6
Tiny Network-Problem with Office Software
Hi, I am having some trouble to some Office software with wine. The Program itself starts without problems and runs quite fine. But unfortunatly I am not able to connect to our local Datebase. My Ubuntu Linux itself doesnt seem to have any problems in connecting to the server (but I admit that I don't know how to check if I can access the port 5143 that is used to connect to the database.).
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 27
3
Enumerable?
Hi, Can anyone please point me to some docs on Enumerable. I can''t seem to find anything on how to use it. Thanx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060327/0825d5e8/attachment-0001.html
2007 Mar 05
1
Re: Asterisk Java w/ Threads
With Asterisk-Java the proposed solution to connect to multiple Asterisk servers is to create multiple AsteriskManagerConnection obeject. Each ManagerConnection handles its own thread so there is no need for custom thread handing code. All you have to do is to make sure is the EventListener objects you pass to these connections synchronize access to shared data (if there are such accesses). I
2006 Jul 06
3
Calling Method
Is there a way to call a method if I only have a string that contains the method name. For example: @methods = [''method1'', ''method2'', ''method3''] @step = 1 # I want to call method2 which has a definition in this class -- Posted via http://www.ruby-forum.com/.
2006 Apr 06
2
making an integer from a float
Does anybody know how to turn a floating-point number (i.e. 60.345) into an integer by cutting off or rounding the decimal portion? Either method, or both, would be quite welcome. Thanks! This forum rocks! -- Posted via http://www.ruby-forum.com/.
2006 Mar 31
6
string interpolation - #{} vs. single vs. double quotes
Could someone point me to documentation that provides a succinct and accurate description of the difference between interpolation using #{}, single quotes, and double quotes ? I imagine there''s a set of precedence rules that govern behavior if/when they''re mixed. I''d like to get clear on this. Thanks, Bill -------------- next part -------------- An HTML attachment was
2006 Feb 01
4
Where is the send() function?
Hi, in the tutorial "4 Days on Rails" the following code fragment is used: ,---- | <% for column in Category.content_columns %> | <td><%=h category.send(column.name) %></td> | <% end %> `---- Apparently, the send() function returns the column value by name, but where does this function comes from? Unfortunately, neither the tutorial nor the API
2006 Jul 31
2
[UPDATE] More info on RubyConf 2006 registration
Hi -- Registration for RubyConf 2006 is still scheduled to open on August 2, in the early evening Pacific (US West Coast) time. Also, there''s more info at http://www.rubycentral.org/conference (e.g., the fact that this year we''re only taking credit cards, etc.). David P.S. Any LA area Rubyists around? I''ll be there this week doing Rails training. --
2006 Apr 30
3
Ruby Reference
Hello all, What Ruby reference is everybodies favorite? When I''ve been looking around for documentation I haven''t found any that quite compares to php.net''s and cppreference.com''s function references. I''ve been using the one found on rubycentral, but I think that it is missing quite a bit and doesn''t have very good examples. ri is fine, but
2006 Jul 30
8
Method_missing from Ruby for Rails book
I''m having a problem getting this example from the book to work: class Cookbook attr_accessor :title, :author def initialize @recipes = [] end def method_missing(m, *args, &block) @recipes.send(m, *args, &block) end end cb = Cookbook.new cb << recipe_for_cake cb << recipe_for_chicken beef_dishes = cb.find_all {|recipes| recipe.main_ingredient ==
2006 Apr 27
12
how to do a count with a variable...
hi guys, got this problem... in my controller, when i wanna do a @temp.count it fails... then i went to try counter = @temp.count which also failed.. thus, i feel that the count is not available for ActiveRecord::Base..so i went to the Model class eg. user.rb so in user.rb : ... def count_uesr count = 0 self.each do |record| count ++ end return count end then it ended up having
2006 Feb 21
7
Self-referencial habtm relationship
Heyo! I am setting up a self-referencial habtm relationship with the users of my app. I am using Chad Fowler''s "Rails Recipes" to get me started, and everything works great with the join table "people_friends". I add friends by doing somebody.friends << somebodyelse. However, with my app, there is an approval process so my join table has columns person_id,
2014 Jun 26
2
About memory index/search in multithread program
There may be some solutions?for example class XAPIAN { *static* int InitDatabase(); //for reading only, do not need lock, but if writing use lock int Search(); //safe in one object, do not need lock }; XIPIAN xp[ THREAD_NUM ]; one thread use one object, they use one database. these can be in memory with one database. 2014-06-24 20:48 GMT+08:00 Olly Betts <olly at survex.com>: