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: Advanced:
What's New Generation and Top 10%

 



skirrow
stranger

Apr 17, 2001, 5:27 AM

Post #1 of 2 (872 views)
What's New Generation and Top 10% Can't Post

Hi,
OK, I have a flatfile database. It has a field in it $date.
This is the date that the record was added.
The format is 04/17/01
MM/DD/YY
What I need to do is find all records which were created in the last X days.
How do I do this?

Also, I have another field which is just a number, e.g. 201
What I need to do is have a script that checks all the numbers in the db and lists the top X percent. How do I do this?

I'd be grateful of all help!!
- Neil

--
http://www.cgi-index.com/
http://www.cgiscriptreview.com/


monocle
User

Apr 17, 2001, 9:05 AM

Post #2 of 2 (869 views)
Re: What's New Generation and Top 10% [In reply to] Can't Post

For your first question, I would suggest using the Date::Calc mod http://search.cpan.org/search?dist=Date-Calc It has all sorts of date manipulation functions. You would likely be interested in the Delta_Days function comparing the current date with the DB dates until they become greater than X days apart.

As for the other question... I am not sure I understand what you are trying to do. sorry.

Hope I could be of some help.

monocle


 
 


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

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