# how to find the given date is sunday

Pushpa Sheela
how to find the given date is sunday
2 Answer(s)      6 years and 7 months ago
Posted in : Java Beginners

how to find the given date is sunday in java?

October 23, 2010 at 12:58 PM

Hi Friend,

Try the following code:

```import java.util.*;
import java.text.*;
class  CheckDay{
public static void main(String[] args){
Date date= (new GregorianCalendar(2010, Calendar.SEPTEMBER, 20)).getTime();
SimpleDateFormat f = new SimpleDateFormat("EEEE");
String day=f.format(date);
if(day.equals("Sunday")){
System.out.println("20-09-2010 was a Sunday");
}
else{
System.out.println("No, it was "+day);
}

}
}
```

Thanks

October 25, 2010 at 11:51 AM

Thankyou. its working fine.

how to find the given date is sunday
how to find the given date is sunday  how to find the given date is sunday in java?   Hi Friend, Try the following code: import...=f.format(date); if(day.equals("Sunday")){ System.out.println("20-09-2010
is this programm efficient to find the day of the given date . can it be more normalized ?
is this programm efficient to find the day of the given date . can it be more normalized ?  #include <stdio.h> int main(void) { int dd...] ; strcpy(week[0], "Sunday") ; strcpy(week[1], "Monday") ; strcpy(week[2
how to find last day 0f any given month in mysql?
how to find last day 0f any given month in mysql?  how to find last day of any given month in mysql?   Hi Friend, Here is required code: DECLARE @dtDate DATETIME SET @dtDate = '8/18/2007' SELECT DATEADD(s,-1,DATEADD
how to find subarray from given large 2d array of arbritary dimension
how to find subarray from given large 2d array of arbritary dimension  my code is: import java.lang.*; import java.io.*; import java.io.File; import... to print the subarray of any dimension from given array file. i have tried upto
Day for the given Date in Java
Day for the given Date in Java  How can i get the day for the user...("Enter date(1-31):"); int dd=input.nextInt(); System.out.println("Enter...("Enter year: "); int year=input.nextInt(); Date date= (new GregorianCalendar
find the given input is integer or string
find the given input is integer or string  simple coding for to check the given input value is integer or no.If the given value is integer display "Value is integer" otherwise "Value is not a integer"?   class
Finding A Date
end date - not defined Calculation Frequency is Weekly(Sunday) My calculation will be from 24-08-2012 to the following sunday My question is how to find the following date of sunday
Find whether a date will be in the current quarter or the next quarter
and is not yet over so my end date should be calculated as 23-09-2012 How to find...Find whether a date will be in the current quarter or the next quarter   I have a date - example - 22-09-2012(start date) I have to find my end date
Finding Last Modification Date of a file
Get the Last Modification Date      Get the Last Modification Date This section contains the detail about how to get the last modification date of a file
Write a program to find a factorial in any given number
Write a program to find a factorial in any given number This programming tutorial will teach you how to write a factorial of any given number... that is equal to 24, and factorial of  0! is 0 always.Example : A program to find
Find the date of the file before the file has been modified
Find the date of the file before the file has been modified  Hi, may i know is it possible to find the date of the file before the file has been modified?   hi friend, you can get the date of last modified file using
How to find hashtable size in Java?
How to find hashtable size in Java?  Hi, What is the code for Hashtable in Java? How to find hashtable size in Java? Give me the easy code. Thanks
how to find jdk path in ubuntu?
how to find jdk path in ubuntu?  How to find out the path of installed jdk in ubuntu? Could anyone tell that command to execute from terminal.. Thanks
How to compare date in Java?
How to compare date in Java?  Hi, How to compare date in Java? Thanks   Hi, Check this example Date Comparison. Thanks
How to Find PHP version and configuration?
How to Find PHP version and configuration?  Find PHP version and configuration   If you want to find the version of PHP, you can just run...: http://www.phpzag.com/find-php-version-and-configuration
Find out the prime number
to find out whether a given number is prime or not. Here we have used the 'for loop' statement and given the required condition for a prime number. As we know... Find out the prime number
How to Convert String to Date?
How to Convert String to Date?  Hi, I am new in Java and learning the Date manipulation in Java. I have to write a program in Java which converts... have to convert it to Date object. Tell me How to Convert String to Date? Thanks
Java Find Next Date Example
Java Find Next Date Example In this example we will discuss about how to find the next date of the input date. This example explains you about how... will demonstrate you about how to find the next date of the input date
how to add date and change date in java - netbeans
how to add date and change date in java - netbeans  I need to code use to increase date How to get date after 30 days using netbeans
Java file modified date
Java file modified date In this section, you will learn how to find the modification date and time of the file. Description of code: We have created... that will return the modification date and time of the file. This return value
How to find run time in SQL.
How to find run time in SQL.  I have 10 backend jobs in sql which... 22/10/2010 17:30:00 I want to find the run time of both the jobs. (i.e when i run the query it should show me how long job has been running) Could you please
How to calculate Date Difference in Java?
How to calculate Date Difference in Java?  Hi, I have two dates variable. How to calculate Date Difference in Java? Thanks   Hi, You can...(); And then easily find the date difference. Check tutorial Date Difference
plz give me program to this: Given a string and a number ‘n’, find the ‘n’th distinct repeating character.
plz give me program to this: Given a string and a number ?n?, find the ?n?th distinct repeating character.    Given a string and a number ?n?, find the ?n?th distinct repeating character. For example, Input: Abracadabra, 1
2. Given a string and a number ‘n’, find the ‘n’th distinct repeating character.
2. Given a string and a number ?n?, find the ?n?th distinct repeating character.    Given a string and a number ?n?, find the ?n?th distinct repeating character. For example, Input: Abracadabra, 1 Abracadabra, 2 Abracadabra, 3
how to get current date without system date
how to get current date without system date  is there any possiblity to get current date instead of system date in Java, as i dont want to change date in program and if i change date in OS automatically change in program also
How to find a servlet object by name?
How to find a servlet object by name?  How can we locate a servlet object in the code by it's object name?   A. In web.xml you map servlet and define url pattern. Now this url-pattern is used for calling servlet. <
How to find maximum value in ArrayList
How to find maximum value in ArrayList  **Sir i am writing below code but its not working.i don't know how to implement logic my requirement.My requirement is find maximum value in userdefined objects and dispaly that object
How to find maximum value in ArrayList
How to find maximum value in ArrayList  **Sir i am writing below code but its not working.i don't know how to implement logic my requirement.My requirement is find maximum value in userdefined objects and dispaly that object
How to find maximum value in ArrayList
How to find maximum value in ArrayList  **Sir i am writing below code but its not working.i don't know how to implement logic my requirement.My requirement is find maximum value in userdefined objects and dispaly that object
How to find maximum value in ArrayList
How to find maximum value in ArrayList  **Sir i am writing below code but its not working.i don't know how to implement logic my requirement.My requirement is find maximum value in userdefined objects and dispaly that object
date_parse
date_parse() in PHP date_parse function returns associative array with detailed information about given date. It returns information about the date on success, or FALSE on failure. An error message will display if date format faces any
Tutorials