problem in date comparision

#!/bin/ksh

var="2009-08-31 12:39:05 UTC"

ddate=`echo $var|cut -d' ' -f1`
y1=`echo $ddate|cut -d'-' -f1`
m1=`echo $ddate|cut -d'-' -f2`
d1=`echo $ddate|cut -d'-' -f3`

filedate=$y1$m1$d1
currdate="20070814"

if [[ $filedate -lt $currdate ]]; then
                echo "$LINE -> $filedate LOWER THAN $currdate"
        else
                echo "$LINE -> $filedate GREATER THAN OR EQUAL TO $currdate"
        fi

filedate="20070930"

if [[ $filedate -lt $currdate ]]; then
                echo "$LINE -> $filedate LOWER THAN $currdate"
        else
                echo "$LINE -> $filedate GREATER THAN OR EQUAL TO $currdate"
        fi

O/P:

-> 20090831 GREATER THAN OR EQUAL TO 20070814
-> 20090831 GREATER THAN OR EQUAL TO 20070930

but if u see the filedate 20070930 should be lower than 20070930 if we go by date wise comparision. and i expected the value to be "$filedate LOWER THAN $currdate"

Can you please suggest me on this

---------- Post updated at 06:26 AM ---------- Previous update was at 06:22 AM ----------

Sorry for the confusion i got the answer:

-> 20090831 GREATER THAN OR EQUAL TO 20090814
-> 20090831 LOWER THAN 20090930