تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
2 الردود
2509 أدوات العرض

Hello,

i want to make a search view; but i have a problem when my search is based on the following field:

'reports_datecreation' :fields.function(_getcreatedate, method=True, type='char', string='le', store=True),

the ERROR is the Following:

ProgrammingError: operator does not exist: timestamp without time zone ~~* unknown LINE 1: ...ch14_reports" WHERE ("ch14_reports"."create_date" ilike ' ... ^ HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.

Can someone tell me what'is wrong ? the field saved is : 2014-08-14 16:20:38.546581 her type is char

الصورة الرمزية
إهمال
الكاتب أفضل إجابة

Thanx for your answer but it is an str
 

الصورة الرمزية
إهمال
أفضل إجابة

The return of your "_getcreatedate" method is most likely not a string, but something like a datetime object?

الصورة الرمزية
إهمال