CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 Date Add

Print topic Send  topic

Author Message
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
View profile  Send private message
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
View profile  Send private message
Joe
Posted: 06/10/2004, 12:27 PM

Peter You are the Man! ! ! ! Thank You

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.