怎么在注册时把注册时间和过期时间写进数据库

如何在注册时把注册时间和过期时间写进数据库?RT想写一个系统验证程序,在注册时把注册时间和过期时间都写

如何在注册时把注册时间和过期时间写进数据库?
RT
想写一个系统验证程序,在注册时把注册时间和过期时间都写进数据库,请问样怎样写啊?谢谢!!


[解决办法]
数据库表
注册日期字段默认值设为getdate()
create table t_user (
uid varchar(20) primary key,
pwd varchar(15),
regdate datetime default(getdate()), --注册日期
expdate datetime --过期日期
)
-------------------------------------------------------
在前台程序执行代码
dim oCon as new adodb.connection
'用户注册函数
public function RegUser(sUid as string,sPwd as string,dtExp as date) as boolean
dim sSql as string
sSql= "insert into t_user(uid,pwd,expdate) values( ' " & sUid & " ', ' " & sPwd _
& " ', " & dtexp & ") "

on error goto errHd
oCon.execute sSql,,adcmdtext
RegUser=True '注册成功
exit function
errHd:
RegUser=False '注册失败
end function