How to get the count of sunday between two dates?


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users How to get the count of sunday between two dates?
# 1  
Old 02-20-2013
How to get the count of sunday between two dates?

Hi Am using unix Ksh

I have the two dates
Code:
DATE1=01/01/2013
DATE2=11/02/2013

In this two dates i need the output as count of sunday

Code:
sunday=6

Can anyone help me pls!!!
# 2  
Old 02-20-2013
You have posted this same question several times!!

Thread 1
Thread 2
Thread 3
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to get first sunday of the month?

Hi, Please can someone help me in getting first sunday date of a month. i_year=`date +%Y` ny_first_sun_nov=`cal 10 $i_year | sed '/^$/d' |head -3 |tail -1| rev | cut -c1` This works good if the first sunday has a value but not if it is blank and first sunday falls on second week. ... (17 Replies)
Discussion started by: infyanurag
17 Replies

2. Shell Programming and Scripting

Second sunday of March

Hi, I want to get the second Sunday of march in any year, I have tried below command but it is not giving me the correct output i_year=`date +%Y` cal -m 03 $i_year | sed '/^$/d' |head -4 |tail -1|rev | cut -c1` This is returning me 0 , where as I want 10. Can you please help Thanks (5 Replies)
Discussion started by: infyanurag
5 Replies

3. UNIX for Advanced & Expert Users

How to get the Missing dates between two dates in the table?

Hi Am Using Unix Ksh ... I have a Table called date select * from date ; Date 01/02/2013 06/02/2013 I need the output as Missing Date 01/02/2013 02/02/2013 03/02/2013 04/02/2013 05/02/2013 06/02/2013 (2 Replies)
Discussion started by: Venkatesh1
2 Replies

4. UNIX for Advanced & Expert Users

How to get the sunday days between two dates?

Hi Am using Unix Ksh I have a two date input as DATE1=02/12/2012 DATE2=30/12/2012 I Need the output as only sunday date 02/12/2012 09/12/2012 16/12/2012 23/12/2012 30/12/2012 can anyone pls help me.. thanks in advance... (2 Replies)
Discussion started by: Venkatesh1
2 Replies

5. UNIX for Advanced & Expert Users

How to take the count of all sundays between two dates?

Hi Am Using Unix Ksh I have input DATE1=01/11/2012 DATE2=10/12/2012 need output as count of all sundays between these two dates for examples Sunday count between DATE1 and DATE2 is 5 Can anyone help me... (11 Replies)
Discussion started by: Venkatesh1
11 Replies

6. UNIX for Dummies Questions & Answers

How to write the dates between 2 dates into a file

Hi All, I am trying to print the dates that falls between 2 date variables into a file. Here is the example. $BUS_DATE =20120616 $SUB_DATE=20120613 Output to file abc.txt should be : 20120613,20120614,120120615,20120616 Can you pls help me accomplish this in LINUX. Thanks... (5 Replies)
Discussion started by: dsfreddie
5 Replies

7. Shell Programming and Scripting

Last sunday of current date

Hi Please help me with this problem i need to find the date of last week sunday from the current given date (12 Replies)
Discussion started by: aishsimplesweet
12 Replies

8. UNIX for Dummies Questions & Answers

Run script on every second sunday

I was to schedule a script in a crontab after every 15 days specically on every 2nd Sunday. I know that i can schedule on basis of weekdays, but can it be done by skipping in between???:wall: (5 Replies)
Discussion started by: masquerer
5 Replies

9. Shell Programming and Scripting

Need script to generate all the dates in DDMMYY format between 2 dates

Hello friends, I am looking for a script or method that can display all the dates between any 2 given dates. Input: Date 1 290109 Date 2 010209 Output: 300109 310109 Please help me. Thanks. :):confused: (2 Replies)
Discussion started by: frozensmilz
2 Replies
Login or Register to Ask a Question