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

  • SEARCH
  • Home
  • 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 9202697
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T23:18:57+00:00 2026-06-17T23:18:57+00:00

I have a arraylist which is string type. In this arraylist i store some

  • 0

I have a arraylist which is string type. In this arraylist i store some date like

 ArrayList<String> date = new ArrayList<String>();
    date.add("20-jan-2013 11:32:39 AM");
    date.add("21-jan-2013 11:32:39 AM");
    date.add("22-jan-2013 11:32:39 AM");
    date.add("23-jan-2013 11:32:39 AM");
    .
    .
    .
    .
    .
    .
    date.add("29-jan-2013 11:32:39 AM");

More then 20 value in the array list. and my question is how i get the value(date) from arrayList in between two value(date) like from this date 21-jan-2013 11:32:39 AM to 27-jan-2013 11:32:39 AM.
Help me thanks

  • 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-17T23:18:58+00:00Added an answer on June 17, 2026 at 11:18 pm
    SimpleDateFormat dateFormat = new SimpleDateFormat("dd-mmm-yyyy hh:mm:ss aa");
    Date convertedDate = new Date();
    ArrayList<String> filteredDate=new ArrayList<String>;
    Iterator<String> iterator = lList.iterator();
    
    for (String temp : lList) 
    {
     try
        {
        convertedDate = dateFormat.parse(temp);
         } 
        catch (Exception e) 
        {
        e.printStackTrace();
        }
        if((convertedDate.before(date2)) && (convertedDate.after(date1))) //here "date2" and "date1" must be converted to dateFormat
        {
          filteredDate.add(convertedDate); // You can use these filtered ArrayList
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have java API which return this type: ArrayList[ArrayList[String]] = Foo.someJavaMethod() In scala program,
I have 2 arraylists contained objects like this: 1st arraylist contains string and double
So I have this method which will take an ArrayList of Integers, I compare
I have arraylist myorderdata . I want to retrieve this arraylist to one String
To make things simple, I have an ArrayList called items (which stores a string
Here i have this type of String and i want to split this string
I have class called GroupItem, i can store any type here say int, string,
I have static ArrayList<Batch> . i want to remove which object contain productcode This
I want to add both String and Integer type of value in ArrayList. For
I have a database column which contains varchar data type. I would like 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.