naikonta has asked for the wisdom of the Perl Monks concerning the following question: ⭐ (dates and times)
I provide a field for user to type in a date string, mostly in 'DD-MM-YYYY' format, and store it later in MySQL database, which uses 'YYYY-MM-DD' format. But sometimes, users use different separators such as slashes and dots. And in the edit form I have to display the date back to its original form. How do I do that? (Assume the input is in valid date range.)
Originally posted as a Categorized Question.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: How do I convert date format between 'DD-MM-YYYY' and 'YYYY-MM-DD' back & forth?⭐
by jettero (Monsignor) on May 08, 2007 at 19:41 UTC | |
Re: How do I convert date format between 'DD-MM-YYYY' and 'YYYY-MM-DD' back & forth?
by naikonta (Curate) on May 08, 2007 at 19:35 UTC | |
Re: How do I convert date format between 'DD-MM-YYYY' and 'YYYY-MM-DD' back & forth?
by naikonta (Curate) on May 08, 2007 at 19:39 UTC | |
Re: How do I convert date format between 'DD-MM-YYYY' and 'YYYY-MM-DD' back & forth?
by naikonta (Curate) on May 08, 2007 at 19:36 UTC |
Back to
Seekers of Perl Wisdom