retreiving past 7 days record from mysql database from user specified date
===

I have a TA_PUNCH table as

    CREATE TABLE TA_PUNCH(
	Punch_id bigint not null auto_increment,
	Emp_id int references TA_EMP_BADGE.Emp_id,
	txn_type int,
	Punch_time bigint,
	Last_update_time DATETIME,
	Last_user varchar(20) references Trace_user.Username,
	Primary key(Punch_id));

I am storing punch_time in long in yyyymmdd format. But now user gives a string in yyyymmdd format and I have to retrieve records of that user in last 7 days. How can I proceed?? What conversions should be done?? 