# Comparing Dates

**URL:** <https://forum.servoy.com/t/comparing-dates/6821>\
**Category:** Classic Servoy\
**Created:** [December 2, 2006, 12:54am UTC](https://forum.servoy.com/t/comparing-dates/6821 "2006-12-02T00:54:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Steve](https://avatars.discourse-cdn.com/v4/letter/s/f19dbf/32.png) [@Steve](https://forum.servoy.com/u/Steve)\
**Post date:** [December 2, 2006, 12:54am UTC](https://forum.servoy.com/t/comparing-dates/6821/1 "2006-12-02T00:54:46Z")

</div>

What’s best practice for comparing dates in Servoy?  
i.e.

Is date1 greater than date2?,  
What date is date1 + 5 days?,  
Today’s date - date1 = ? days?,  
etc.

Anyone know of a comprehensive primer on Servoy dates?!

---

<div class="post-metadata">

**Author:** ![patrick](https://avatars.discourse-cdn.com/v4/letter/p/b2d939/32.png) [@patrick](https://forum.servoy.com/u/patrick)\
**Post date:** [December 2, 2006, 10:43am UTC](https://forum.servoy.com/t/comparing-dates/6821/2 "2006-12-02T10:43:56Z")

</div>

“Servoy dates” are JavaScript dates. So just google for that and you find tons of information. You can start here [http://www.w3schools.com/jsref/jsref\_obj\_date.asp](http://www.w3schools.com/jsref/jsref_obj_date.asp).

You could also have a look at our dateUtils plugin. It makes some date related math a lot easier.

---

<div class="post-metadata">

**Author:** ![Steve](https://avatars.discourse-cdn.com/v4/letter/s/f19dbf/32.png) [@Steve](https://forum.servoy.com/u/Steve)\
**Post date:** [December 4, 2006, 4:46pm UTC](https://forum.servoy.com/t/comparing-dates/6821/3 "2006-12-04T16:46:47Z")

</div>

Thanks! I get it now. Did as you suggested and found exactly what I needed at [http://codepunk.hardwarorg.uk/ajs07.htm](http://codepunk.hardwarorg.uk/ajs07.htm)

---

<div class="post-metadata">

**Author:** ![Dexadrine](https://avatars.discourse-cdn.com/v4/letter/d/65b543/32.png) [@Dexadrine](https://forum.servoy.com/u/Dexadrine)\
**Post date:** [December 5, 2006, 9:24am UTC](https://forum.servoy.com/t/comparing-dates/6821/4 "2006-12-05T09:24:46Z")

</div>

Try this page as well, it has just about everything you need to know about js dates:

[http://www.merlyn.demon.co.uk/js-dates.htm](http://www.merlyn.demon.co.uk/js-dates.htm)

---

<div class="post-metadata">

**Author:** ![Steve](https://avatars.discourse-cdn.com/v4/letter/s/f19dbf/32.png) [@Steve](https://forum.servoy.com/u/Steve)\
**Post date:** [December 5, 2006, 4:21pm UTC](https://forum.servoy.com/t/comparing-dates/6821/5 "2006-12-05T16:21:30Z")

</div>

Thanks! Added to ‘Favorites’ list!
