i have an variable mydate=2008Nov07
i want o/p as in variable mymonth=11 (i.e nov comes on 11 number month)
i want some command to do this for any month without using any loop.
plz help me (1 Reply)
Dear All,
Actually, i'm doing some reporting job and i need to pass yesterday's date in Year-Month-Day format(e.g. 2009-06-10) to another program for generating 2009-06-10 report.
to get today's date, it's easy to just date '+%Y%m%d' , but no idea how can i get this kind of format for... (2 Replies)
Hi Experts,
How to convert months into numeric format with the help of some script:
Suppose I want:
" Jan | Feb | Mar | Apr | May | Jun | Jul | Aug | Sept | Oct | Nov | Dec "
to be converted as :
" 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 | 10 | 11 | 12 "
Thanks in... (2 Replies)
Hello,
How do I convert unix timestamp value to 'normal' date format - to get year month and day values ?
Looks like it's easy to do using GNU date (linux systems). But how do I do tthis on AIX ?
I don't want to write C program, any ways to do that using unix shells ?
thanks (1 Reply)
I have files like
pra.01
sra.02
see.03
swc.03
sre.04
after dot it contain month format when ever user type "01" month i have to fetch what are 01 files to come (2 Replies)
Hi Guru's,
I am working on a shell script from past a month and unable to get rid of automating while working with dates,here's what i have.
inital_date=11012011
final_date=11302011
expected_output= has to be in below format PFB
11012011
11022011
11032011
*
*
*
11102011
*
*... (9 Replies)
How to convert date format such as 7/18/2015 to the number of month from requesting date 'date' in sh scripting ?
Let say I have output in my log.txt -> 7/18/2015. How I convert it to the full number of month starting from 'date' till 7/18/2015 in shell scripting ? Thanks in advance. (1 Reply)
Hi Unix Experts,
Happy Morning to all !! :)
I am new to UNIX Shell Scripting and at my begineer level. To get acquainted to scripting, I am trying to create a script.
The details/requirements of my script was to create a script with month changing logic in it so that on every 6th Working... (3 Replies)
I need the date format in YYYY.MM format and I am able to get current month date as well as previous month date with below command
PM=`date +'%Y.%m' -d 'last month'`
CM=`date +'%Y.%m' -d 'now'`
but I need to get YYYY.MM date format for previous 12 months so could you please help me how I get... (2 Replies)