On Oct 22, 6:01 pm, RubyonRails_newbie <[email protected]>
wrote:

> However. When this is saved to the database it looks like: 1988-10-01.
> Likewise on the site a user will eventually see. If they originally
> enter it as: 01/10/1988, why does it display backwards?
>
> And, is there a solution to this to allow it to be stored as dd/mm/
> yyyy?
>
How the database stores the date isn't really any of your business -
chances are that it's not stored as a string at all. What you're
seeing is probably just the Date classes default to_s method (which
again bears little relationship to how instances of Date store their
value) When you get a date out of the database it's up to you to
format it the way you want it before display (eg use strftime)/

Fred

> Many thanks in advance!
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to