Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9782

Unavailable Date in a Date Range

$
0
0

I created a form with fields to enter a start date and an end date. The form successfully rejects any dates that fall on or between a specific date range: 03/05/2023 to 10/05/2023 (dd/mm/yyyy). But, it will accept start and end dates that include the restricted date range as long as the start and end dates are outside the restricted date range.

For example, the date range 02/05/2023 to 11/05/2023 would be accepted by the form even though it includes the restricted date range 03/05/2023 to 10/05/2023.

This is how I currently work it:

=(FirstDayOf Required < DateTime.Today) or  (FirstDayOf Required.Date = DateTime.Today) or  (FirstDayOf Required >= "12/02/2023" and FirstDayOf Required <= "12/17/2023") or (FirstDayOf Required >= "03/28/2023" and FirstDayOf Required <= "04/16/2023") or (FirstDayOf Required >= "06/26/2023" and FirstDayOf Required <= "06/30/2023") or (FirstDayOf Required >= "05/20/2023" and FirstDayOf Required <= "05/20/2023") or  (FirstDayOf Required >= "03/11/2023" and FirstDayOf Required <= "03/18/2023") or  (FirstDayOf Required >= "03/04/2023" and FirstDayOf Required <= "03/05/2023")

How can I reject start and end dates within my restricted date range, and also ones start and end dates outside the restricted date range but whose date range includes my restricted date range?


Viewing all articles
Browse latest Browse all 9782

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>