Skip to main content

Notifications

Dynamics 365 general forum

View based on todays date

Posted on by 385

I have a start date and end date field on a form.

I would like to create a view that only shows things that are not past the end date.

So basically today() is not after end date.

But I can't figure out how to get that?

Is that something I can do with fetch? If so what is the expression to use not Today()?  CURDATE()?  Etc.

Thanks,
Terry

  • LeoAlt Profile Picture
    LeoAlt 16,329 on at
    RE: View based on todays date

    Hi partner,

    Thanks for your recognition and I'm so glad to hear that you have resolved your problem:-)

    Have a nice day.

    Best Regards,

    Leo

  • Mattw112b Profile Picture
    Mattw112b 385 on at
    RE: View based on todays date

    Thanks Leo, this worked for me!

    Terry

  • Verified answer
    LeoAlt Profile Picture
    LeoAlt 16,329 on at
    RE: View base don todays date

    Hi partner,

    You could use calculate field to get the days between now and the end date and then use this as a filter condition to create a view.

    Here are the steps.

    1. Create a calculate filed (whole number).

    3482.community111.PNG

    2. Click the edit button to config the calculation rules.

    0121.community110.PNG

    We use the formula provided by Microsoft to calculate the days between today and end date.

    https://docs.microsoft.com/en-us/dynamics365/customer-engagement/customize/define-calculated-fields

    pastedimage1565949150196v1.png

    Then the number filed will store the days.

    pastedimage1565949267237v2.png

    3.Create a new view.

    Then you could set the view filter condition like if daffer>0 (which means) we haven't reached the end of the day yet today.

    pastedimage1565949414201v3.png

    Hope it helps.

    Best Regards,

    Leo

  • Suggested answer
    RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: View base don todays date

    Hi,

    There is no out of box operator to return results greater than today but you can use "Next 'X' Years" operator and specify some high number like 99 years. This way you are telling crm to return records which are in next 99 years.

    Hope this helps.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans