# Comparing dates

**URL:** <https://forum.servoy.com/t/comparing-dates/3398>\
**Category:** Classic Servoy\
**Created:** [January 7, 2005, 4:24pm UTC](https://forum.servoy.com/t/comparing-dates/3398 "2005-01-07T16:24:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Morley](https://avatars.discourse-cdn.com/v4/letter/m/7cd45c/32.png) [@Morley](https://forum.servoy.com/u/Morley)\
**Post date:** [January 7, 2005, 4:24pm UTC](https://forum.servoy.com/t/comparing-dates/3398/1 "2005-01-07T16:24:36Z")

</div>

I need to compare two date fields, excluding the time aspect. Is this date the same as that date – not just the day of the month but day, month and year. So far I’ve built a routine that sequentially compares the day, the month, the year, a lot of lines of code.

Am I correct there’s an easier way?

---

<div class="post-metadata">

**Author:** ![david](https://avatars.discourse-cdn.com/v4/letter/d/aeb1de/32.png) [@david](https://forum.servoy.com/u/david)\
**Post date:** [January 7, 2005, 6:40pm UTC](https://forum.servoy.com/t/comparing-dates/3398/2 "2005-01-07T18:40:25Z")

</div>

I love it: question posted from Toronto…Enrico from Italy sends me the answer to post as a tip on Servoy Magazine…and I’m in Washington DC! You’d think we would all have something better to do on a Friday afternoon than slaving away at Servoy…

[Enrico’s answer](http://www.servoymagazine.com/home/2005/01/tip_return_numb.html)

Good question, great answer.

---

<div class="post-metadata">

**Author:** ![automazione](https://avatars.discourse-cdn.com/v4/letter/a/8797f3/32.png) [@automazione](https://forum.servoy.com/u/automazione)\
**Post date:** [January 7, 2005, 6:41pm UTC](https://forum.servoy.com/t/comparing-dates/3398/3 "2005-01-07T18:41:27Z")

</div>

Date comparison has been covered other times in this forum, but your question suggested me this tip, hope it helps:

[http://www.servoymagazine.com/home/2005 … \_numb.html](http://www.servoymagazine.com/home/2005/01/tip_return_numb.html)
