Hi,
How can we get the week number from any paricular date. lets say date is 20120404 (YYYYMMDD) then how to get the week number?
date +%W --- Thic command gives the week number for current date only.
Thanks.
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.
I am using the following to find the Day of the Week on my server which is in UTC.
Code:
DAY=$(date --date="yesterday" +'%A')
But say if I want to find the Day of the Week in another timezone, how would one go about it. I had a look at date --help but could not find any timezone related switches so am not sure if this is possible using this method.
Thanks & Regards,
I am unable to get the last week date i tried to use the following commands but i failed
Please help, and am using HP unix
Code:
date -d "+1 week"
date --date=yesterday +%y%m%d
Hi,
I need subtract two date values (which are in day of the year format) and the output would give the remaining days. using the command date +"%j" i would get today's 'day of the year' i.e.,
Code:
> date +"%j"
256
Next, i need to take input of a previous date in the format 09/05/2012 and then convert it to 'day of the year format'.
Hi All,
I have a quick question with regards to SED syntax, and I hope someone here can help me out.
I have some text based reports in which I would like to strip the "Current Date" from and replace with equivalent number of empty spaces, for every occurrence.
For example, here is what I need to strip:
Hi All,
I have a quick question with regards to SED syntax, and I hope someone here can help me out.
I have some text based reports in which I would like to strip the "Current Date" from and replace with equivalent number of empty spaces, for every occurrence.
For example, here is what I need to strip:
Hi.First posting here ...There seems to be an issue w/ the registration."date -u +%W$(uname)" gives "01Linux" on my system.The registration requested "02Linux" ... ?!Wrong week?BTW ...
I see lot of request posted in internet to find out the day of nth week in a Month.
example:
what is the date of 3rd Sunday in October
What is the date of 2nd Friday in June 2012
what is the date of 4th Saturday in January 2011..etc..
The below shell script is used to find out the days for the nth particular week in a month.
Try it out and shout if you find any issues… (Script is t