Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8353903
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T09:23:53+00:00 2026-06-09T09:23:53+00:00

I have two strings, for example 05.04.2002 and 23.01-2002 – 23.06.2002 . How would

  • 0

I have two strings, for example 05.04.2002 and 23.01-2002 - 23.06.2002.

How would I find out if the date in my first string is between the dates in the second string?

What I have been thinking

dateString := '05.04.2002';
dateRangeString := '23.01-2002 - 23.06.2002';

date := StrToDate( dateString );
rangeStart := StrToDate( LeftStr(dateRangeString, 10) );
rangeEnd := StrToDate( RightStr(dateRangeString, 10) );

Now from there I don’t know what to do!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T09:23:55+00:00Added an answer on June 9, 2026 at 9:23 am

    You can use the unit System.DateUtils and its function DateInRange:

    var
      dStart, dEnd, d2Test: TDate;
    begin
      dStart := StrToDate('25/07/2012');
      dEnd   := StrToDate('29/07/2012');
    
      d2Test := StrToDate('26/07/2012');
    
      if DateInRange(d2Test, dStart, dEnd) then
        ShowMessage('In range!');
    

    You can also check the fourth parameter of this function (AInclusive: Boolean = True)… depending on your need…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For example we have two strings: string s = cat; string s1 = dog;
I have two strings and would like to display the difference between them. For
I have two strings. How can I determine whether the first string is composed
I have two strings: the first's value is catdog and the second's is got.
How to get all dates between two dates in Android. For example. I have
I have an two variables as CSV strings. Example: $csva = 1,4,7,10,39,12; $csvb =
I have two strings, one a key and one a value, which I would
I have two strings String s1=426F62; String s2=457665; The strings are in hex representation.
I have two string variables ticker and detail. I'm trying to print out the
I have two example filename strings: jquery.ui.min.js jquery.ui.min.css What regex can I use to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.