Joe
|
| Posted: 06/10/2004, 8:13 AM |
|
How do i Add 3 Hours to this Commad
Old Code:
"update Information set last_login=now(), Login_Count = Login_Count+1 where UsrID=" & CCGetUserID()
New Code:
"update Information set last_login=(DateAdd("h","+3", Now)), Login_Count = Login_Count+1 where UsrID=" & CCGetUserID()
But the new one did not work,
Thanks
|
|
|
 |
peterr
Posts: 5971
|
| Posted: 06/10/2004, 11:42 AM |
|
Looks OK. Maybe just try this minor adjustment:
"update Information set last_login=DateAdd("h",3, Now()), Login_Count = Login_Count+1 where UsrID=" & CCGetUserID()"
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |
peterr
Posts: 5971
|
| Posted: 06/10/2004, 11:55 AM |
|
Actually, the problem must be in quotes. If you use "h" then you're completing your UPDATE statement.
Use this code instead:
"update Information set last_login=DateAdd('h',3, Now()), Login_Count = Login_Count+1 where UsrID=" & CCGetUserID()
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |
Joe
|
| Posted: 06/10/2004, 12:27 PM |
|
Peter You are the Man! ! ! ! Thank You
|
|
|
 |
|