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 8694455
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T00:47:36+00:00 2026-06-13T00:47:36+00:00

I am working on a project where I have created 2 variables startdate ,

  • 0

I am working on a project where I have created 2 variables startdate,enddate of type Date in java.
As you know Date in Java includes both date and time.
But while querying I only need the date (specifically day) part of the startdate variable.
I tried startdate.getday() but it says it’s deprecated and I should use Calendar.get(Calendar.DAY_OF_MONTH) instead.
But I don’t know how to use this, tried googling everywhere, the solution is to get the current date.

I want to do something if startdate contains (30/01/1988 02:30:54) so that I get 30/01/1988 or if possible 30 and 01 and 1988 separately in string/int variables.

  • 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-13T00:47:39+00:00Added an answer on June 13, 2026 at 12:47 am
     Calendar cal = Calendar.getInstance();
     cal.setTime(startdate);
     cal.get(Calendar.DAY_OF_MONTH);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a couple of java working sets for a project in my
I am currently working on grails project. I have created eight different plugins. Each
I have created a wix installer project which is working fine. It installs my
I have been working on an iPhone project, where we created all the user
I'm working on a project that requires GUI, but I have no experience with
I have been working on a project about sentence similarity. I know it has
I am working on a project where I have to create a chain with
I am working on a project and have the following psuedocode: // create a
i have a problem on a project I'm working on. I have to create
I am working on my minor project. I have to create an image editor

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.