1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2025-02-16 19:40:44 +01:00

Correzione data

This commit is contained in:
Beppe 2023-07-05 14:57:15 +02:00
parent aa8bf9307f
commit c018d871cc

View File

@ -214,7 +214,7 @@ class Query
$value = trim(str_replace(['<', '>'], '', $value));
if ($more || $minus) {
if( date_parse($value) && date_parse($value)!='1970-01-01' ){
if( date_parse($value) && date("Y-m-d",strtotime($value))!='1970-01-01' ){
$search_filters[] = 'DATE_FORMAT('.$search_query.', "%Y-%m-%d") '.$sign.' '.prepare(date("Y-m-d",strtotime($value)));
}else{
$search_filters[] = 'CAST('.$search_query.' AS UNSIGNED) '.$sign.' '.prepare($value);