# Search Dates

**URL:** <https://forum.servoy.com/t/search-dates/3071>\
**Category:** Classic Servoy\
**Created:** [November 16, 2004, 3:22pm UTC](https://forum.servoy.com/t/search-dates/3071 "2004-11-16T15:22:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Johann](https://avatars.discourse-cdn.com/v4/letter/j/54ee81/32.png) [@Johann](https://forum.servoy.com/u/Johann)\
**Post date:** [November 16, 2004, 3:22pm UTC](https://forum.servoy.com/t/search-dates/3071/1 "2004-11-16T15:22:19Z")

</div>

I’ve created a find form based on globals.

I’m trying to offer a search by date :  
Find all actions with action\_date \>= globals.date1  
or \<= globals.date2  
or globals.date1 \<= action\_date \<= globals.date1

I’ve work on it but without results :

Help and forum proposes :  
//performs a find for a date range in startDateTime  
controller.find();  
startDateTime = ‘1-1-2004…1-30-2004|MM-dd-yyyy’;  
controller.search();

but I can’t find the right syntax for the use of variables instead of values…

I hoped something like this would work :

forms.action.controller.find()  
forms.action.action\_date = ‘\>= globals.date1’  
forms.action.action\_date = ‘\<= globals.date2’  
forms.action.controller.search()

…but it doesn’t.  
Any ideas?

thanks in advance.  
Johann

---

<div class="post-metadata">

**Author:** ![Johann](https://avatars.discourse-cdn.com/v4/letter/j/54ee81/32.png) [@Johann](https://forum.servoy.com/u/Johann)\
**Post date:** [November 16, 2004, 3:57pm UTC](https://forum.servoy.com/t/search-dates/3071/2 "2004-11-16T15:57:57Z")

</div>

To be more accurate I hoped I could do something like :

forms.action.controller.find()  
if (globals.date1)  
{  
forms.action.action\_date = ‘\>= globals.date1’  
}  
if (globals.date2)  
{  
forms.action.action\_date = ‘\<= globals.date2’  
}  
forms.action.controller.search()

![:?]( "Confused")

---

<div class="post-metadata">

**Author:** ![Johann](https://avatars.discourse-cdn.com/v4/letter/j/54ee81/32.png) [@Johann](https://forum.servoy.com/u/Johann)\
**Post date:** [November 17, 2004, 9:21am UTC](https://forum.servoy.com/t/search-dates/3071/3 "2004-11-17T09:21:55Z")

</div>

I’ve omitted the following post in my previous search of the forum :

[http://forum.servoy.com/viewtopic.php?t … dateformat](http://forum.servoy.com/viewtopic.php?t=1349&start=0&postdays=0&postorder=asc&highlight=utils+dateformat)

![:roll:]( "Rolling Eyes")
