salesagility / SuiteCRM-Core

SuiteCRM - Open source CRM for the world
https://www.suitecrm.com
GNU Affero General Public License v3.0
163 stars 115 forks source link

Filter using advanced filter date between start date and end date failed #476

Open davidospina opened 3 weeks ago

davidospina commented 3 weeks ago

Issue

I’m trying to filter records from a start date and end date using the Advance Filter but it doesn’t work even if I know for sure that the records have that date. The console log of SuiteCRM show: “[ERROR] convert: Conversion of 2024-01-01<>2024-05-01 from Y-m-s H:i to Y-m-d failed”

I though it was a matter of format conversion or the fact that some date columns has date/time format and the search input only allow dates but even if I put the dates in the same format as the Database or if I add the complete format Y-m-s H:i to the search, the outcome is the same.

Other date filters like "last year" or "last mont" are working but the ones related with between function aren't

Expected Behavior

Filter records using the date selected in the input "begin" and the last date in the input "end".

Actual Behavior

The filter show the message that "no results found"

Possible Fix

Is not a suggestion but there are some threads related the format date like "dd/mm/yyyy" and the message says that the function of conversion failed to convert a dat with no hours and minutes in it to a plain date without time.

Environment

scicali commented 2 weeks ago

On public/legacy/include/TimeDate.php, line 982, date format expected from user preferences but angular ui send datetime always in "to_internal" format (Y-m-d H:i)

scicali commented 1 week ago

On public/legacy/include/SearchForm/SearchForm2.php, line 1167 is wrong for 8.x