validation of data using filter (awk or other that works...) in csv files

Hello People

I have the following file.csv:

date,string,float,number,boolean
20080303,abc,1.5,123,Y
20080304,abc,1.2,345,N
20080229,nvh,1.4,098,Y
20080319,ugy,1.9,586,N
20080315,gyh,2.4,345,Y
20080316,erf,3.1,932,N

I need to filter the date field where I have a data bigger than I pass (this date I�ll receive and store into a variable) reject the data and remove it from my file. So today is 20080305 then I receive this date and store in a variable. My file need to have only the rows with the dates 20080303, 20080304, 20080229 according to my file above.

I�ve tried to remove it using the command :
awk -F, 'BEGIN {OFS=","} { if ($1 = ${date}) print $0}' file.csv > ex.csv

However it looks like that the awk do not take variables into account.

Does anyone have any ideia?

Regards

To remove the rows with the current date in the first field:

awk -v var=${date "+%Y%m%d"} 'BEGIN{FS=OFS=","} $1==var{next}1' file.csv > ex.csv

Regards