473,471 Members | 1,854 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

DATE in Perl

48 New Member
Hi
I need to get ten previous year and month from the current date....
Is there any perl module which I can use for the same..
For eg if the date is 2008-07-10
I nned to get the following output

2008-06
2008-05
2008-04
2008-03
2008-02
2008-01
2007-12
2007-11
2007-10
2007-09

So a total count of 10 entries as above .Can you please give some pointers to solve the same....

Thanks in Advance
Mar 13 '08 #1
1 1327
numberwhun
3,509 Recognized Expert Moderator Specialist
Hi
I need to get ten previous year and month from the current date....
Is there any perl module which I can use for the same..
For eg if the date is 2008-07-10
I nned to get the following output

2008-06
2008-05
2008-04
2008-03
2008-02
2008-01
2007-12
2007-11
2007-10
2007-09

So a total count of 10 entries as above .Can you please give some pointers to solve the same....

Thanks in Advance
I don't know of a module that would do specifically that, but you could definitely write some code to do it. Why not try writing it and if you get stuck, then post the code here (in code tags) and we will help you.

Regards,

Jeff
Mar 13 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: blupp | last post by:
Hi, I am trying to install the package, but get the following error: cpan> install Date::Manip Running install for module Date::Manip Running make for S/SB/SBECK/DateManip-5.42a.tar.gz LWP...
2
by: cp | last post by:
My background is C and Perl. I'm new to javascript, but not programming. I need to make two simple calendars with the next two months dates in them. I call them with the current month, as in: ...
10
by: Newsscanner | last post by:
Hello, In my MySQL database, one of the fields eople have to fill in is "DOB" (Date of Birth). I have now managed to begin inserting data into my DB via a form, the data type for the DOB field...
4
by: yasaswi | last post by:
Now that MySQL 5.0.15 is production ready, are there any functions to use with mysqlimport, so I can load a string such as, MM/dd/yy, in a text file into a MySQL database as a yyyy-MM-dd date...
1
by: Me | last post by:
I need to get the past 5(x) months for certaing calculations. What I have is listed below: ######################################## my $year, $month_str, $month_int; foreach my $count...
12
by: jonathan184 | last post by:
Hi the purpose of the script I am trying to do is to access a dir and run the ls -l command which will show the files and the modified date, no w the script is to check two files in that dir , if the...
11
by: Jason Carlton | last post by:
I'm sure this is an easy one, but I can't seem to find it! I have the date and time as: # Nov 28, 2007, 11:11:14pm $timestamp = 20071128231114; In Perl, I would split this up as: my...
3
by: Rocko | last post by:
Hi, Wishing you a very Happy New Year!! I am new to perl and I need to know that how to get the current date & time in my perl script. I am working on Windows XP. my code snippet is like this: ...
5
by: Manogna | last post by:
hi! i got the following error while using the Date::Calc module in perl. plz help me.. the file is ex.pl contains code like this: use strict; use Date::Calc();
4
by: g0uki | last post by:
Hi all, Hope someone can help, i get the date in the format of 12/12/2008 i 'd like to find out what day this is on, either a weekday/weekend. so output would be: 12/12/2008 midweek: fri 12...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.