Problem searching dates

Hi, I have a form with a datetime field and its format value is d/m/Y h:i:s

Then, to search, I put other field to search d/m/Y to find the records of the day, without time...

When I search, I type: for example 30/01/2009*

but when do the search, my search rule is for example:

[field] LIKE '30/01/2009'

but it should be:

[field] LIKE '30/01/2009%'

I think that the problem is when the TypeManager::parseDate method is executed.

If you don't use format or use the format %Y-%m-%d, the problem doesn't exists.

 

And this is the reason:

-----------------------------------------------------------------------------------------

public function ConvertDatetimeFormat ($fmt_value, $fmt1, $fmt2)
    {
        if ($fmt1 == $fmt2)
            return $fmt_value; //<- Don't call to this->parseDate
        $timestamp = $this->parseDate($fmt1, $fmt_value);
        return strftime($fmt2, $timestamp);
    }

 

protected function DateToValue ($fmt, $fmt_value)
    {
        if (! $fmt_value)
            return '';
        $std_format = $this->ConvertDatetimeFormat($fmt_value, $fmt, '%Y-%m-%d');
        return $std_format;
    }

----------------------------------------------------------------------------------------

What can I do?

The date conversion is

The date conversion is tricky for query. The ideal query should be like

[field] >= '30/01/2009' AND [field] < '31/01/2009'. [field] LIKE '30/01/2009%' seems wrong. You may need to write your own SearchRecord method.

- support