Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4084262
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T18:25:02+00:00 2026-05-20T18:25:02+00:00

In Ruby 1.87 I could do: Date.parse (3/21/2011) Now in 1.9.2 I get: ArgumentError:

  • 0

In Ruby 1.87 I could do:

Date.parse ("3/21/2011")

Now in 1.9.2 I get:

ArgumentError: invalid date

Any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T18:25:03+00:00Added an answer on May 20, 2026 at 6:25 pm

    Use strptime and give a specific time format.

    ruby-1.9.2-p136 :022 > Date.strptime '03/21/2011', '%m/%d/%Y'
     => #<Date: 2011-03-21 (4911283/2,0,2299161)>
    

    See michaelmichael‘s response for the reason for this difference between Ruby versions.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've done some Python but have just now starting to use Ruby I could
In Ruby (forgive me for mentioning it's name) I noticed you could do a
I'm writing a ruby program that executes some external command-line utilities. How could I
I realize I could whip up a little C or Ruby program to do
Are there any Ruby gems/libraries that help you migrate from an old DB structure
I recently moved from ruby to python and in ruby you could create self[nth]
I have the following error during sqlite3-ruby install: Building native extensions. This could take
Could you explain in detail what the :before_save and :before_create Ruby on Rails callbacks
I am new to ruby on rails, could anybody explain what does the symbol
I was reading up on Ruby, and learned about its mixins pattern, but couldn't

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.