Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

date value increments by one when updating

Status
Not open for further replies.

ItHurtsWhenIThink

Technical User
Sep 1, 2007
60
US
Do not know why, but when ever I update a record (specifically the date colomn) the date gets incremented by one +1 day.

I know that the value passed to it is correct, but when it updates the value to the database it just adds one day to the date value.

I've pulled much of my hair out, all that's left is nubs.

Please help.

Here is the chunck of code with the problem:

LeaveDate field is the problem child. data type= smalldate, typ value= "12/23/2009"

set rs = Server.CreateObject("ADODB.Recordset")
sqlstatement="SELECT * FROM LeaveRequests WHERE LeaveID=" & intID
rs.Open sqlstatement, ConnectionString(),1,3

rs("ApprovedBy")=Request.Cookies("UserID")
rs("Status")="Approved"
rs("CalendarID")=intNewID
rs("TakenBy")=intRep
rs("StartTime")=STime
rs("EndTime")=ETime
rs("TypeShift")=varTypeShift
rs("LeaveDate")=strDate
response.write("LDate=" & strDate & "<BR>")
rs("TypeLeave")=NewString(Request.Form("frmType"))
If strNotes<>"Add Notes Here." Then
rs("Notes")=strNotes
End If
rs.Update
rs.close
set rs = nothing


Thanks,
 
Check if there is trigger on this table or a trigger involving this table that changes the date.
 
no triggers found

other tables in db work fine with date data types.

looked in trigers for this table... none.

hmmmmm?

You are a tek-tips junkie aren't you!

thanks for helping all us newbies.

I appreciate all the help you have given me.

where can I find the type of work you have done? you have a web site?
 
I have a blog, but I've written only 8 blogs so far. I don't have a website.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top