# Use date field for segmenting

**URL:** <https://forum.mautic.org/t/use-date-field-for-segmenting/17273>\
**Category:** Product Support\
**Created:** [December 3, 2020, 12:53pm UTC](https://forum.mautic.org/t/use-date-field-for-segmenting/17273 "2020-12-03T12:53:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tonershop](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/tonershop/32/1530_2.png) [@tonershop](https://forum.mautic.org/u/tonershop)\
**Post date:** [December 3, 2020, 12:53pm UTC](https://forum.mautic.org/t/use-date-field-for-segmenting/17273/1 "2020-12-03T12:53:55Z")

</div>

**Your software**  
My Mautic version is: v2.16.2  
My PHP version is: 7.2.24  
My Database type and version is: -

**My Question**  
My problem is:

We are selling a saas product and every customer has an entry with a paid until date value, see image below:

 ![Knipsel8](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/9/9ffe752e1d4ad3eea94333394a57f1c556119a05.jpeg)

We would like to be able to use this field to create a segment, the segment should contain all customers for which the paid until date is 2 weeks from now.

So today the segment should list all customers that are due to pay on dec 17.

How to setup the segment to achieve this?  
Any help would be appreciated!

---

<div class="post-metadata">

**Author:** ![mikew](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mikew/32/5156_2.png) [@mikew](https://forum.mautic.org/u/mikew)\
**Post date:** [December 3, 2020, 1:46pm UTC](https://forum.mautic.org/t/use-date-field-for-segmenting/17273/2 "2020-12-03T13:46:04Z")

</div>

Not sure but you could try use Paid Until “equals”+14. Run the segment cronjob and see what happens.  
I have tested this and it seems to be working.

---

<div class="post-metadata">

**Author:** ![tonershop](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/tonershop/32/1530_2.png) [@tonershop](https://forum.mautic.org/u/tonershop)\
**Post date:** [December 4, 2020, 5:19pm UTC](https://forum.mautic.org/t/use-date-field-for-segmenting/17273/3 "2020-12-04T17:19:50Z")

</div>

Hi @mikew, thx for your reply.  
I have tried it like this but that only gives me the accounts that expire today and not the ones that expire +14 days:

 ![Knipsel9](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/c/c7ad5735e5bbfe7336bb754529318ac2fb806aae.jpeg)

Did I do something wrong?

---

<div class="post-metadata">

**Author:** ![mikew](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mikew/32/5156_2.png) [@mikew](https://forum.mautic.org/u/mikew)\
**Post date:** [December 6, 2020, 12:48pm UTC](https://forum.mautic.org/t/use-date-field-for-segmenting/17273/4 "2020-12-06T12:48:02Z")

</div>

no that looks correct. What version of mautic are you running.

maybe try and write “+14 days”

---

<div class="post-metadata">

**Author:** ![tonershop](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/tonershop/32/1530_2.png) [@tonershop](https://forum.mautic.org/u/tonershop)\
**Post date:** [December 7, 2020, 1:41pm UTC](https://forum.mautic.org/t/use-date-field-for-segmenting/17273/5 "2020-12-07T13:41:32Z")

</div>

Hi @mikew, that fixed it, thx a lot!!
