Re: Convert string into incremental date
- From: usenet@xxxxxxxxxxxxxxx
- Date: 30 May 2006 16:33:53 -0700
djray wrote:
My question is two part:
1. I am reading a date from a file in the form mm/dd/yy (i.e.
05/30/06). I need to convert that string into a date.
Let a module do that for you.
2. I need to be able to increment that date:
Let a module do that for you as well.
#!/usr/bin/perl
use Date::Manip;
my $date = "05/30/06";
$date = DateCalc($date, "+ 1 day");
$date = DateCalc($date, "+ 1 day");
print UnixDate($date, "%D"); #display like mm/dd/yy
__END__
--
David Filmer (http://DavidFilmer.com)
.
- Follow-Ups:
- Re: Convert string into incremental date
- From: rjulich
- Re: Convert string into incremental date
- References:
- Convert string into incremental date
- From: djray
- Convert string into incremental date
- Prev by Date: Re: Convert string into incremental date
- Next by Date: How to have a Perl script emulate a keystroke to another application
- Previous by thread: Re: Convert string into incremental date
- Next by thread: Re: Convert string into incremental date
- Index(es):
Relevant Pages
|