E
E
Evgeny Ivanov2016-08-16 09:03:55
Delphi
Evgeny Ivanov, 2016-08-16 09:03:55

How to determine if a date is in an interval?

There are 3 text dates. Start date, end date, check date.
Each date consists of a month and a year. For example 08.2016.
How to determine the occurrence of the date being checked, in the interval of the start date and end date? Inclusive.
i.e. Start Date<=Checked Date<=End Date

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
kalapanga, 2016-08-16
@kalapanga

Use DateInRange instead of comparisons.
If you need to add days, then everything is already implemented in the language. Apply StartOfTheMonth to the start date, EndOfTheMonth to the end date.

E
Evgeny Ivanov, 2016-08-16
@logpol32

Seems to have figured it out.
You just need to convert everything to months. And compare these numbers.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question