Advertisement

03.21.2004 at 04:36PM PST, ID: 20926681
[x]
Attachment Details

Using Perl to compare dates

Asked by lynn402 in CGI Scripting

Tags: perl, compare, date

I have created a grade book for myself to record my student's math grades. I want to compare the date that I gave the assignment with the quarter's beginning and ending date to show all grades for a given quarter.
...
if ( $assgndate >= $begdate && $assigndate <= $enddate).....

I have used Date::Manip to assist me with the comparison but when I few the error logs
I get error the following type of messages:

[ERROR]{ARGUMENT 20043xxxx is numeric in ge ( >=)...
I also get the same reply for the <= comparison, too

The script does work. I was just curious is there a better, hopefully easier, way to compare dates?

Start Free Trial
[+][-]03.21.2004 at 05:24PM PST, ID: 10646136

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: CGI Scripting
Tags: perl, compare, date
Sign Up Now!
Solution Provided By: Tintin
Participating Experts: 2
Solution Grade: A
 
 
[+][-]03.22.2004 at 01:18PM PST, ID: 10652817

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32