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


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users How to take the count of all sundays between two dates?
# 8  
Old 12-13-2012
Getting error :-
Code:
Invalid character in date/time specification.
Usage: date [-u] [+Field Descriptors]
Invalid character in date/time specification.
Usage: date [-u] [+Field Descriptors]

# 9  
Old 12-13-2012
Quote:
Originally Posted by RudiC
Not sure this will work in ksh; also depends heavily on the version of date you use; give it a shot:
So your version of date does not support the solution I proposed. Tough luck.
# 10  
Old 12-13-2012
What is you OS ( type and Version ) also the date version
# 11  
Old 12-13-2012
# 12  
Old 12-13-2012
Since there was no reply to the Question "Is this homework" And the way the thread owner replies, I assume it is so thread closed!
Dear forumers when asked the question, dont assume it isnt and reply, please...
We dont want to see any replies while subsist doubts, thanks a lot
This User Gave Thanks to vbe For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Add previous Sundays date to filename

I am looking for some scripting help. I need to add a time stamp to a file name. I will append data to a file, and want to add to the file name a time stamp of the previous Sundays date. Any takers? (1 Reply)
Discussion started by: sswagner8839
1 Replies

2. 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

3. UNIX for Advanced & Expert Users

How to get the count of sunday between two dates?

Hi Am using unix Ksh I have the two dates DATE1=01/01/2013 DATE2=11/02/2013 In this two dates i need the output as count of sunday sunday=6 Can anyone help me pls!!! (1 Reply)
Discussion started by: Venkatesh1
1 Replies

4. Shell Programming and Scripting

Taking the count of sundays between two date ?

Hi Am using unix Ksh Datecalc and --date functions are not working have two input variables as DATE=01/12/2012 DATE1=23/12/2012 Need output as no of sundays = 4 Can anyone help me pls :( (2 Replies)
Discussion started by: Venkatesh1
2 Replies

5. 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

6. UNIX for Dummies Questions & Answers

Listing out sundays alone

I am trying to list out only sundays from december 2011. pandeeswaran@ubuntu:~/training$ cal 12 2011|sed -n '3,$p'|sed -e'/^$/d'|awk '{ORS=",";print $1}' 1,4,11,18,25,,pandeeswaran@ubuntu:~/training$ Can anyone help me? Thanks (13 Replies)
Discussion started by: pandeesh
13 Replies

7. UNIX Desktop Questions & Answers

count of sundays in month

Hi, How to get count of number of sundays in month in unix shell script .. ideally i need 2 get last sunday of month so i used cmd: for eg: for june: cal 06 2011 | tail -2 | head -1 | cut -d" " -f1 hoowever above is wrking for month whose sundays are max=4 but not fr months... (4 Replies)
Discussion started by: musu
4 Replies

8. 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

9. Shell Programming and Scripting

Cronjob on alternate sundays

I want to set the crontab job for one of my SIEBEL database to refresh it on alternate sundays. Is there anyway I can do it through cron please ? If not whats the alternative ? :confused: Thanks in advance. (6 Replies)
Discussion started by: abhi123
6 Replies

10. Shell Programming and Scripting

List of Sundays for the years 2000 to 2005

hi, i need to write a script that would list me all sundays in the year 2000 and 2005. output need to be just the date . ;) (1 Reply)
Discussion started by: kquest
1 Replies
Login or Register to Ask a Question