Computing.Net > Forums > Unix > converting month into numbers

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

converting month into numbers

Reply to Message Icon

Name: abhargav
Date: April 22, 2005 at 20:10:32 Pacific
OS: Slackware
CPU/Ram: 900
Comment:

hi
i'm having a problem in converting months into
numericals like converting jan into 1,feb into 2..i can use a case structure.wont be a problem but i'm wondering if there i can use date function for that.
remember i need to get it working on solaris as well as slackware.
if i use date "+%m" and it returns me 04 but how can i find arguments to it.
is it necessary to use case.



Sponsored Link
Ads by Google

Response Number 1
Name: thepubba
Date: April 25, 2005 at 14:30:54 Pacific
Reply:

Try:

date '+%m'

This will return 04 for April.



0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: converting month into numbers

tweaking William's awk script www.computing.net/answers/unix/tweaking-williams-awk-script/5174.html

How to convert .xls into txt file? www.computing.net/answers/unix/how-to-convert-xls-into-txt-file/7769.html

Forcing filename into lowercase in NFS www.computing.net/answers/unix/forcing-filename-into-lowercase-in-nfs/1029.html