# Number of days between datetime and date fields

**URL:** <https://community.spicecrm.io/t/number-of-days-between-datetime-and-date-fields/796>\
**Category:** Uncategorized\
**Created:** [June 1, 2026, 4:10pm UTC](https://community.spicecrm.io/t/number-of-days-between-datetime-and-date-fields/796 "2026-06-01T16:10:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rsp](https://avatars.discourse-cdn.com/v4/letter/r/4491bb/32.png) [@rsp](https://community.spicecrm.io/u/rsp)\
**Post date:** [June 1, 2026, 4:10pm UTC](https://community.spicecrm.io/t/number-of-days-between-datetime-and-date-fields/796/1 "2026-06-01T16:10:04Z")

</div>

If you have one datetime and another date field.

> DATEDIFF(DATE({tc}.quote\_relDATETIMEase\_date\_c), {tc}.DATE)

OR

> DATEDIFF(CAST({tc}.DATETIME AS DATE), {tc}.DATE)
