in reply to Re^4: sort based on date
in thread sort based on date

Your example contains a January date, which is more than 6 month ago.

Note also that for half a year, the previous 6 months will contain dates from more than one year. I presume that if you're running your program in March, you'd want December dates to be sorted before January dates, don't you?

Replies are listed 'Best First'.
Re^6: sort based on date
by suhailck (Friar) on Aug 09, 2010 at 14:13 UTC
    Right, my example is just a sample code written to demonstrate my requirement.
    I didnt notice January included in that array :(
    And let me clarify my requirement, im looking for a minimal approach of reading my firewall log and make a report with DoS attacker's IP,Threat type, No. of attempts, and Last attempt date.
    I need this report only twice a year.That is, from Jan 2010 - June 2010, Jul 2010 - Dec 2010, Jan 2011 - Jun 2011 so on ..
    I would like to archive my log file after each period.
    So i hope this approach will help me in acheiving my task.


    Thanks very much for your support :)

    ~suhail