# relatation between dates

**URL:** <https://forum.servoy.com/t/relatation-between-dates/162>\
**Category:** Classic Servoy\
**Created:** [June 25, 2003, 2:50pm UTC](https://forum.servoy.com/t/relatation-between-dates/162 "2003-06-25T14:50:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Harjo](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/harjo/32/4873_2.png) [@Harjo](https://forum.servoy.com/u/Harjo)\
**Post date:** [June 25, 2003, 2:50pm UTC](https://forum.servoy.com/t/relatation-between-dates/162/1 "2003-06-25T14:50:16Z")

</div>

I have a relation between 2 dates  
field1 = global.date1 (in database: calendar)  
field2 = date (in database: calendar\_lineitems)  
Between those fields I have a relation

In a portal I show the relation, but no relations are seen (I check but there are unique relations!!!)  
It has worked for a couple of day’s but not anymore. I can’t get right!

Anyone any suggestions?

---

<div class="post-metadata">

**Author:** ![Harjo](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/harjo/32/4873_2.png) [@Harjo](https://forum.servoy.com/u/Harjo)\
**Post date:** [June 25, 2003, 5:24pm UTC](https://forum.servoy.com/t/relatation-between-dates/162/2 "2003-06-25T17:24:22Z")

</div>

I am a little bit further now!

field1 = global.date1 (in database: calendar) (DATETIME)  
field2 = date (in database: calendar\_lineitems) (DATETIME)

if I put the cursor in field1 en type by hand the date: 22-06-2003  
than all my appointments (on that date) show up in the portal

if I fill field1 with the following method:

> var a = application.getTimeStamp();  
> a.setDate(a.getDate() - a.getDay());  
> globals.date1 = a

which results in the exact same date: 22-06-2003  
than all my appointments dissapear!  
Relookup doesn’t help.

Does anyone know what I’am doing wrong?
