D
Duppypog
I'm trying to compare a date stored in a database with today's date using an
If statement, but it's not returning true. Example, value in database is
11/5/2003 with today being 11/6/2003. Can someone spot the problem?
Thanks,
Lynnette
Here's the code:
sSQL = "Select PWExpire FROM tblUsers where strUserName = '" & stUser & "'
AND strPassword = '" & hshPW & "'"
cmd = New OleDbCommand(sSQL, cnn)
Dim pwEx As DateTime = cmd.ExecuteScalar
If pwEx.ToString("d") > DateTime.Today Then
If statement, but it's not returning true. Example, value in database is
11/5/2003 with today being 11/6/2003. Can someone spot the problem?
Thanks,
Lynnette
Here's the code:
sSQL = "Select PWExpire FROM tblUsers where strUserName = '" & stUser & "'
AND strPassword = '" & hshPW & "'"
cmd = New OleDbCommand(sSQL, cnn)
Dim pwEx As DateTime = cmd.ExecuteScalar
If pwEx.ToString("d") > DateTime.Today Then