<div dir="ltr">Hi,<div><br></div><div>As Support Start Date is a Date field, feeding string value will lead to parse error. Please do select value from date-picker instead of string value.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 11, 2015 at 8:31 PM, apcloic <span dir="ltr"><<a href="mailto:apcloic@gmail.com" target="_blank">apcloic@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I'm trying to use expression for a custom view filter in standard Contacts<br>
module, I'm using VT 6.1<br>
<br>
I can't get this to work with standard Date fields (ex : 2015-02-11 like<br>
"Support Start Date" field).<br>
<br>
When saving filter with the following custom condition :<br>
<br>
Support Start Date --> equals --> today<br>
<br>
I've noticed that value field from vtiger_cvadvfilter is set to "--today"<br>
and not "today". If I put the correct value directly in database, there is<br>
no special error but it's not working at all.<br>
<br>
However, it seems to be working for DateTime fields (ex : 2015-02-11<br>
09:10:42 like "Modification Time" field) AFTER changing vtiger_cvadvfilter<br>
value field from "--today 00:00:00" to "today 00:00:00" (or simply "today"<br>
is working too).<br>
<br>
Most of the time, when saving your custom filter, it returns the following<br>
errors :<br>
<br>
DateTime::__construct(): Failed to parse time string (--today) at position 0<br>
(-): Unexpected character<br>
<br>
<br>
DateTime::__construct(): Failed to parse time string (--today) at position 0<br>
(-): Unexpected character<br>
--today 00:00:00<br>
<br>
When editing filter, even if value had been corrected in vtiger_cvadvfilter,<br>
it display again "--today" as value and when saving, new value in database<br>
is "today--"<br>
<br>
It happens on 3 different vTiger 6.1 instance.<br>
<br>
I've just tried with a brand new fresh VT 6.2 installation, same kind of<br>
errors and still not working for standard date fields, however value stored<br>
in database looks like "-today-" instead of "today--"<br>
<br>
Any idea ?<br>
<br>
Regards,<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://vtiger-crm.2324883.n4.nabble.com/Vtigercrm-developers-Filters-and-expressions-tp10106p15304.html" target="_blank">http://vtiger-crm.2324883.n4.nabble.com/Vtigercrm-developers-Filters-and-expressions-tp10106p15304.html</a><br>
Sent from the vtigercrm-developers mailing list archive at Nabble.com.<br>
_______________________________________________<br>
<a href="http://www.vtiger.com/" target="_blank">http://www.vtiger.com/</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">With<br>Best Regards<br>Uma.S<br><div>Vtiger Team</div></div></div>
</div>