Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Open Source > Perl
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Perl section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 11th, 2007, 03:44 PM
Registered User
Join Date: Apr 2007
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default want to convert date from 01/12/07 to 12-Jan-2007

Hi Charlie,

your last post was very helpful. Even along with that, i am looking to change the date format from 01/12/07 to 12-Jan-2007, can you please tell me how can i do that and by using which module.


Reply With Quote
  #2 (permalink)  
Old April 12th, 2007, 05:47 AM
Friend of Wrox
Points: 8,019, Level: 38
Points: 8,019, Level: 38 Points: 8,019, Level: 38 Points: 8,019, Level: 38
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jan 2005
Location: Mauchline, East Ayrshire, Scotland
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to crmpicco Send a message via AIM to crmpicco Send a message via MSN to crmpicco Send a message via Yahoo to crmpicco

does this help? i would suggest using Date::Calc;


# Craig R Morton
# 11-Apr-2007

use strict;
use Date::Calc qw/Add_Delta_Days/;

my $current_year = (localtime)[5]+1900;

my $ordinal = 60;
my ($yr, $mon, $mdy) = Add_Delta_Days($curr_year, 1, 1, $ordinal-1);

my $mon_t = (qw/Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec/)[$mon-1];

print "$mday $mon_t $yr\n";
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
how can i convert date into format '2007-10-25T11: vishnu108mishra C# 2 November 23rd, 2007 04:45 AM
Errors on Chapter 12 example(12.8) sonnie ASP.NET 2.0 Professional 2 June 7th, 2006 10:55 AM
Chapter 12... rrlevron BOOK: Beginning ASP 3.0 2 January 16th, 2006 01:09 AM
12/30/1899 ASP Date from SQL chris42480 Classic ASP Databases 2 March 8th, 2004 02:23 PM

All times are GMT -4. The time now is 11:15 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.