searching in date fields via method

Hello, I am trying to search in a datetime field using only the date portion. I am using this code

controller.find()
date_field = '#31.3.2004'
controller.search()

This throws an error. Is that expected behaviour or a bug?

Thanks
Patrick

You should search like:

date_field = '#' + utils.dateFormat(date_you_search_for, "d.M.yyyy") + '|d.M.yyyy';

or following your example:

date_field = '#31.3.2004|d.M.yyyy';

Cool, I did and it works. Thanks for your help.

How do I know that?

Well, once upon a time there was somebody who invented paper. A few steps and ages later there was the computer and all of a sudden pdf bla bla bla :lol:

Take a look in the docs. I think it is in Servoy Developer.pdf or Servoy_Advanced_Programming_Guide.pdf… And ofcourse the forum. I am sure it is asked and answered more than once.