CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
Date Comparing

 



perlkid
stranger

Oct 11, 2000, 3:49 PM

Post #1 of 2 (239 views)
Date Comparing Can't Post

 
I checked at the perl faq, and they don't give any code for this.

How do I compare dates, if a line in a file with a date in field 6 has already passed, how do I know to exclude that line when I loop through the file.

Thanks,

perlkid


perlkid
stranger

Oct 11, 2000, 4:17 PM

Post #2 of 2 (239 views)
Re: Date Comparing [In reply to] Can't Post

 
I think I just got it with this code,

$time = timelocal(33, 25, 07, 05, 05, 1999);
print "$time";

Then I can compare that with th current date (in epoch seconds) and it will be in the negatives if it has past when I subtract the date in the data base from the current date. Right?

perlkid

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives