Getting month and changing format


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Getting month and changing format
# 8  
Old 05-19-2008
Is it not possible to have it somehow in this format:

Code:
my $month=echo(""_"$(date '+%m')"_"");

?
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to get last 12 month date in YYYY.MM format?

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)
Discussion started by: Amit Joshi
2 Replies

2. Shell Programming and Scripting

Help with shell script on Month Changing Logic

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)
Discussion started by: micky3112
3 Replies

3. Shell Programming and Scripting

How to convert date format such as 7/18/2015 to the number of month

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)
Discussion started by: amerabest
1 Replies

4. Shell Programming and Scripting

How to Find number of days in a month in mmddyyyy format?

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)
Discussion started by: Gaurav198
9 Replies

5. UNIX for Dummies Questions & Answers

how to fetch month format files in a file

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)
Discussion started by: sgoud
2 Replies

6. AIX

Convert unix timestamp to year month day format ?

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)
Discussion started by: vilius
1 Replies

7. Shell Programming and Scripting

script for month conversion in numeric format

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)
Discussion started by: rveri
2 Replies

8. Shell Programming and Scripting

Get yesterday's date in year-month-day format?

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)
Discussion started by: tiger2000
2 Replies

9. Shell Programming and Scripting

changing month in Mmm format to mm FORMAT

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)
Discussion started by: RahulJoshi
1 Replies

10. Shell Programming and Scripting

How to print current month - 1 in string format

I need to get the current month -1 in string format, like Feb-2006. I am using k shell. Any help is appreciated. (3 Replies)
Discussion started by: mogli4
3 Replies
Login or Register to Ask a Question
HTML::FormHandler::Field::Date(3pm)			User Contributed Perl Documentation		       HTML::FormHandler::Field::Date(3pm)

NAME
HTML::FormHandler::Field::Date - a date field with formats VERSION
version 0.40013 SUMMARY
This field may be used with the jQuery Datepicker plugin. You can specify the format for the date using jQuery formatDate strings or DateTime strftime formats. (Default format is format => '%Y-%m-%d'.) d - "%e" - day of month (no leading zero) dd - "%d" - day of month (two digit) o - "%{day_of_year}" - day of the year (no leading zeros) oo - "%j" - day of the year (three digit) D - "%a" - day name short DD - "%A" - day name long m - "%{day_of_month" - month of year (no leading zero) mm - "%m" - month of year (two digit) "%m" M - "%b" - month name short MM - "%B" - month name long y - "%y" - year (two digit) yy - "%Y" - year (four digit) @ - "%s" - Unix timestamp (ms since 01/01/1970) For example: has_field 'start_date' => ( type => 'Date', format => "dd/mm/y" ); or has_field 'start_date' => ( type => 'Date', format => "%d/%m/%y" ); You can also set 'date_end' and 'date_start' attributes for validation of the date range. Use iso_8601 formats for these dates ("yyyy-mm- dd"); has_field 'start_date' => ( type => 'Date', date_start => "2009-12-25" ); Customize error messages 'date_early' and 'date_late': has_field 'start_date' => ( type => 'Date, messages => { date_early => 'Pick a later date', date_late => 'Pick an earlier date', } ); If form has 'is_html5' flag active it will render <input type="date" ... /> instead of type="text" AUTHOR
FormHandler Contributors - see HTML::FormHandler COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Gerda Shank. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. perl v5.14.2 2012-06-25 HTML::FormHandler::Field::Date(3pm)