similar to: Oracle date, i get 0007 instead of 2007

Displaying 20 results from an estimated 7000 matches similar to: "Oracle date, i get 0007 instead of 2007"

2006 Jul 06
6
Help with overriding / overwriting date values in ActiveRecord to accept Euro Style Date from a Textbox
Hi guys, I''m trying to make an AR model which accepts a string data (from a text input) in euro date format eg <input .... value = "23/01/2006"> ( 23 Jan 2006) Reading the example from RDoc... i tried to overwrite/overload/override the = function to write in the date.. Cant get it to work because .. i dont knoe what format should it accept.. i''ve tried
2006 Jun 15
4
parse only seem to understand US date format
I''ve tried Time.parse() and DateTime.parse() but they interpret the date as US format. Is there any way to tell it to interpret as dd/mm/yyyy? -- Posted via http://www.ruby-forum.com/.
2006 May 16
4
Date/Time Quick Add
I am building a small app that reuires some clever text pattern matching... In my controller, I''ll have a string that I will want to parse out to a datetime and a message, a la Google Calendar Quick Add. Examples: 10/30/2006 7pm message 10-30-96 7:00 pm message 10/30/2006 19:00pm message ... You see what I''m getting at. For a v1.0 release, I CAN publish some standards for
2006 Mar 23
5
validates_dateness_of ?
Hello all. I don''t suppose some enterprising soul with much more skill than me has whipped up a "validates_dateness_of" (Complete with leap year calculations) method for use with all the other validation methods and wishes to spread much much joy? Cheers Jeff "I can barely code RoR and rely on others to do the hard work" Jones -- Posted via
2006 Jul 29
2
Cannot save Date field
Hi, I have a table which has a column called due_date. Datatype of this column in mySQL is "Date". Here is what I extracted from schema.rb > t.column "due_date", :date My fixture tasks.yml file has the following line > due_date: 07/17/2006 My test_task.rb has the following line > assert_equal "07/17/2006", @task.due_date When I run
2007 Aug 12
4
Date and Time validator, updater
Can someone point me to a date/time validator or updater. I have an event start datetime and an event end datetime. I want to validate that the end datetime is after the start datetime. Figure there is some code or library out there already, if you know one, please forward it. Thank you! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are
2006 Mar 10
19
validates_date plugin for ActiveRecord
This plugin gives ActiveRecord the ability to do stricter date checking. Example: class Person < ActiveRecord::Base validates_date :date_of_birth end This will ensure that date_of_birth is a *valid* date. The date can be set initially as a string in any of the following formats: "2006-01-01" "1 Jan 06", or "1 Jan 2006" "1/1/06" # Day /
2006 Jul 31
1
validate date field
hi, Below is an example of a text field I have, which works fine, until you enter an invalid date such as Feb 31st, which doesn''t exist Is there a way of checking this easily and returning an error message like validates_presence_of does ? <p><label for="project_client_deadline_date">Client Deadline Date:</label><br/> <%= date_select
2006 May 16
9
Date transform
hi all, i want my users to enter a date in "ddmmyyyy" format, do someone know how may i transform it in "yyyy-mm-dd" in the controler before i add it to the base please? thks irong -- Posted via http://www.ruby-forum.com/.
2006 Apr 09
6
Validating a DateTime
Hi, Does anyone know of a method to validate a DateTime field? I''ve looked at the validation docs and the validates_date / validates_time plug-in but I can''t find a method to validate a value in the format of yyyymmddhhmm. It seems like something that should exist already, so I''d just like to check before I attempt my own version... Cheers, Mark
2006 May 11
4
string to date/time?
Hey All, Anyone know of a library for parsing "human" dates, like "this friday" or "2 days ago"? I used to use strtotime in php, but starting from here; http://wiki.rubyonrails.com/rails/pages/PhpStrtotime and doing lots of googling, I haven''t been able to find anything similar for ruby. I know of javascript solutions to this, but I''d need to do
2006 Jun 05
5
Regexp - date validation
Can somebody tell me why the following RegExp doesn''t work for date validation in Rails... It validates fine in RadRails -- using REgExp panel. Intended format: (mm/dd/yyyy): %r{^(0[1-9]|1[012])(-|/)(0[1-9]|[12][0-9]|3[01])(-|/)(19|20)([0-9][0-9])$} If i try the following, it works in Rails: %r{(0[1-9]|1[012])(-|/)(0[1-9]|[12][0-9]|3[01])} When I add the last piece, it
2006 Aug 04
1
Parsing Dates bewilderment
Ok, so to me this seems like a very trivial issue, but it is causing hours of frustration. I am hoping that an extra thousand or so sets of eyes will point out where I am obviously making a newbie mistake. I have the following string: "08-04-2006" representing August 4, 2006 I set my attribute ''po_date'' equal to this string and then save it to the database. My
2006 Jul 02
1
acts_as_modified, acts_as_ordered and validates_date_time
A quick note about acts_as_modified, acts_as_ordered and validates_date_time. If you are using any of those plugins you should update them. They''ve all had improvements/bug fixes. Also, acts_as_modified is now being maintained by both Chris Hall and myself. http://svn.viney.net.nz/things/rails/plugins/acts_as_ordered http://svn.viney.net.nz/things/rails/plugins/acts_as_modified
2006 Jun 11
7
testcase_setup_and_teardown_with_blocks (aka "The plugin with the very long name")
Hey all, I got annoyed recently that I couldn''t specifiy multiple chunks of test setup and teardown code that get executed for each test. You''re currently limited to just one setup method (unless I''m much mistaken). Anyway, I just wrapped up my solution in a plugin. The answer: use blocks! class Test::Unit::TestCase # This is overridden by the subclass and will
2009 Mar 09
1
lme anova() and model simplification
I am running an lme model with the main effects of four fixed variables (3 continuous and one categorical – see below) and one random variable. The data describe the densities of a mite species – awsm – in relation to four variables: adh31 (temperature related), apsm (another plant feeding mite) awpm (a predatory mite), and orien (sampling location within plant – north or south). I have read
2006 May 25
5
Is there a way to abstract the updating of other parts of the page after an Ajax request without putting using the standard view file?
Hey all, I''d like to abstract the process of updating different portions of the page after an Ajax request has taken place. Rather than simply putting the extra view logic in the standard rjs template, it seems to give better separation if there is a split between the core view logic (ie, inserting a row in a table), and updating any associated portions of the page. Is this possible? I
2006 Mar 30
2
acts_as_ordered plugin
Hey all, I''ve just put together a little plugin to easily access the neighbours of a given model in a particular order. Read on if interested. Install: script/plugin install http://svn.viney.net.nz/things/rails/plugins/acts_as_ordered Usage: class Person < ActiveRecord::Base acts_as_ordered :order => ''first_name'' end Say you have people with first
2006 Apr 27
3
Removing a default value for a foreign key with not null set
Hi all, For various reasons I need to have foreign keys with not null constraints. Eg: create_table :people do |t| t.column :name, :string t.column :household_id, :integer, :null => false end create_table :households do |t| t.column :name, :string end add_foreign_key_constraint :people, :household_id, :households, :id So the people table has a foreign key into
2007 Feb 13
11
Routing problem (RTNETLINK answers: Invalid argument) on multiple internet link.
Hi all, I''m trying to set up a computer with 2 routes to the internet, much as described at http://lartc.org/howto/lartc.rpdb.multiple-links.html .One of my interfaces (eth5, 192.168.2.2) is only used for traffic originating inside the network. The other (eth1, 192.168.1.2) is only used for a VPN, where all (udp) traffic originates from outside our network. I have created a second