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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T17:47:47+00:00 2026-05-17T17:47:47+00:00

Using Calendar I can get the week, year and all details for the current

  • 0

Using Calendar I can get the week, year and all details for the current day. How can I navigate to a particualr day in that week?

Say, calendar.get(Calendar.DAY_OF_WEEK); returns 3, which means a Tuesday. Now, I want to go to say Friday for that week or any other day in that week. How can I do that?

Thanks for your replies. I think I need to make the scenario more clear.
Basically, I am trying to disable email alerts in my system during specified period.
I get values like:
disableStart = “FRIDAY-19:00”
disableEnd = “SUNDAY-19:00”

Now, i need to verify if email should be sent at a particular time.
e.g. if today = Thursday any time, send email
but, if today = Saturday any time can’t send as per values above.

  • 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-05-17T17:47:47+00:00Added an answer on May 17, 2026 at 5:47 pm

    If I understand correctly you can use the Calendar.set(Field, value) method.

    SimpleDateFormat f = new SimpleDateFormat("dd-MM-yyyy");
    Calendar c = Calendar.getInstance();
    System.out.println(c.get(Calendar.DAY_OF_WEEK));
    System.out.println(f.format(c.getTime()));
    c.set(Calendar.DAY_OF_WEEK, Calendar.TUESDAY);
    System.out.println(c.get(Calendar.DAY_OF_WEEK));
    System.out.println(f.format(c.getTime()));
    

    Produces the output

    6
    08-10-2010
    3
    05-10-2010
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to build a Dynamics CRM 4 query so that I can get
In Python, using calendar.timegm(), I get a 10 digit result for a unix timestamp.
I'm trying to get a session token to use the Google Calendar API using
I have a calendar that uses jQuery and jmpopups to pull Event Details into
How to create a calendar using XML
Anyone know a simple way using Java calendar to subtract X days from a
I am using the AJAX Control Toolkit Popup Calendar Control in a datagrid. When
I am using MS AJAX ASP.NET Components (Calendar Extender) and I'm finding this problem.
Using PyObjC , you can use Python to write Cocoa applications for OS X.
Using ASP.NET MVC there are situations (such as form submission) that may require a

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.