ISO week for date command


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers ISO week for date command
# 1  
Old 06-30-2012
ISO week for date command

Hi Guys,

I came across the %V switch in the date command which displays the ISO week number, with Monday as first day of week (01..53).

for Saturday, Jun 30 2012, the % V option comes up as 26. I've tried to read up on this but i'm unable to comprehend how this value is calculated.

Is it that Saturday is assigned the value 26 ? Please advise

Cheers.
# 2  
Old 06-30-2012
Perhaps you are looking for %U or %W?
# 3  
Old 06-30-2012
My bad, %u actually solved my issue. i wanted to find the day of the week.
Thank you for the help -- cheers
 
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Splitting week start date and end date based on custom period start dates

Below are my custom period start and end dates based on a calender, these dates are placed in a file, for each period i need to split into three weeks for each period row, example is given below. Could you please help out to achieve solution through shell script.. File content: ... (2 Replies)
Discussion started by: nani2019
2 Replies

2. Shell Programming and Scripting

Find week of the year for given date using date command inside awk

Hi all, Need an urgent help on the below scenario. script: awk -F"," 'BEGIN { #some variable assignment} { #some calculation and put values in array} END { year=#getting it from array and assume this will be 2014 month=#getting it from array and this will be 05 date=#... (7 Replies)
Discussion started by: vijaidhas
7 Replies

3. Shell Programming and Scripting

Python script to convert date to iso format

Hi , This is my 1st program in python never tried any python before. i am trying to write a python script which reads a .tsv file line by line and in each line it should look for mm/dd/yyyy formate and convert it to yyyy-mm-dd formate . can some one provide be some sample code to do that. (2 Replies)
Discussion started by: vikatakavi
2 Replies

4. Shell Programming and Scripting

Extract week start,end date from given date in PERL

Hi All, what i want to do in perl is i should give the date at run time .Suppose date given is 23/12/2011(mm/dd/yyyy) the perl script shold find week start date, week end date, previous week start date,end date,next week start date, end date. In this case week start date will be-:12/19/2011... (2 Replies)
Discussion started by: parthmittal2007
2 Replies

5. Shell Programming and Scripting

Date One Week Ago From Given Date, Not From Current Date

Hi all, I've used various scripts in the past to work out the date last week from the current date, however I now have a need to work out the date 1 week from a given date. So for example, if I have a date of the 23rd July 2010, I would like a script that can work out that one week back was... (4 Replies)
Discussion started by: Donkey25
4 Replies

6. Shell Programming and Scripting

how to obtain date and day of the week from `date` command

Hi, does anybody know how to format `date` command correctly to return the day of the week? Thanks -A I work in ksh.... (1 Reply)
Discussion started by: aoussenko
1 Replies

7. Shell Programming and Scripting

need help to get last week date

Hi, How to get last week date ? Normally i use this command : But somehow this not working in SunOS And i try use this : But in SunOS only working only get last 6 days Cheers, (1 Reply)
Discussion started by: justbow
1 Replies
Login or Register to Ask a Question