Support the ongoing development of Laravel.io →
posted 10 years ago
Input
Last updated 2 years ago.
0

this format wont retrieve data from db (mysql)

01-01-2005 

you need to convert to Y-m-d

am i getting your problem ? :D

Last updated 2 years ago.
0

If you want to handle both, can't you just do that in your controller (or model or closure).

something like:

list($one, $two, $three) = explode('-', $date, 3);
$day = 0;
$month = 0;
$year = 0;
if ($one > 100) {
   $day = $three;
   $month = $two;
   $year = $one;
} else {
   $day = $one;
   $month = $two;
   $year = $three;
}
Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

yarcowang yarcowang Joined 25 Feb 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.