Good evening,
We have a problem with the date field. When the visitors fill, for example 12/12/1880, it converts the date to 13/12/1901 or 1961.
How could we have these dates correctly stored?
Angel
Good evening,
We have a problem with the date field. When the visitors fill, for example 12/12/1880, it converts the date to 13/12/1901 or 1961.
How could we have these dates correctly stored?
Angel
Any idea?
Hi,
Where did you get the date converted, your mysql data or machform entry page ?
Since PHP have limitation on date function, with valid range is typically from 13 Dec 1901 GMT to 19 Jan 2038. There might be some glitch when see the date format under 1901.
Anyway to fix the date in view entry, you need to edit "entry-functions.php" file. Go around line 351 and you will see this code :
$date_value = date("m/d/Y",strtotime($date_value));
try replace the code with this
$temp_date = explode('-',$date_value);
$date_value = $temp_date[1] .'/' . $temp_date[2] .'/' . $temp_date[0] ;
then go to line 360, you will see this code
$date_value = date("d/m/Y",strtotime($date_value));
replace with this
$temp_date = explode('-',$date_value);
$date_value = $temp_date[2] .'/' . $temp_date[1] .'/' . $temp_date[0] ;Thank you! It worked ok
Hi!
I've been testing these modifications, but something weird happens. Some dates are received correct, but some others are still changed.
Angel
What dates are received incorrectly? Can you post some examples?
Solicitud de Certificado de Nacimiento [#13555 Jesús Gimen ez Lopez]
[...]
Fecha del nacimiento 13/12/1901
This date is not correct. The customer typed a date in 1894
Angel
Seleccione provincia de nacimiento Sta Cruz de Tenerife
Tipo de certificación Literal
Finalidad del certificado NACIONALIDAD
Nombre y apellidos ***************
Tomo TOMO **
Folio PAGINA **
Fecha del nacimiento 31/12/1969
Solved, it was an Excel problem
You must log in to post.