formatdatetime inserts 1/1/1900 instead of current date
From: rapp25 (rapp25_at_hotmail.com)
Date: 03/31/04
- Next message: Erschwitz: "Service Pack 3A problems"
- Previous message: Andras Jakus: "RE: mastlog.ldf"
- Next in thread: Aaron Bertrand [MVP]: "Re: formatdatetime inserts 1/1/1900 instead of current date"
- Reply: Aaron Bertrand [MVP]: "Re: formatdatetime inserts 1/1/1900 instead of current date"
- Reply: Aaron Bertrand [MVP]: "Re: formatdatetime inserts 1/1/1900 instead of current date"
- Reply: John Bell: "Re: formatdatetime inserts 1/1/1900 instead of current date"
- Messages sorted by: [ date ] [ thread ]
Date: 31 Mar 2004 11:28:54 -0800
Hi:
I am starting to rip my hair out. I pretty much tried everything. I
want to insert following values:
sqlString = "INSERT into myTable (ProductID, Name, Title, CategoryID,
Organization, Address, City, State, Zip, Country, Phone, Fax, Email,
Heard, Referral, Computer, Implement, Description, RepMail, Counter,
Password, Authenticated, Created, LastAccessed) VALUES (" &
strSoftware & ",'" & strName & "','" & strTitle & "'," & strInst &
",'" & strOrganization & "','" & strAddress & "','" & strCity &
"','" & strState & "','" & strPostal & "','" & strCountry & "','" &
strPhone & "','" & strFax & "','" & strEmail & "','" & strHeard &
"','" & strReferral & "','" & strComputer & "','" & strImplement &
"','" & strDescription & "','" & strRepMail & "'," & "0" & ",'" &
strPassword & "'," & "0" & "," & formatdatetime(now,2) & "," &
formatdatetime(now,2) & ")"
Everything works great, but the formatdatetime values are showing in
sql as 1/1/1900. The fields in sql all smalldatetime.
Thanks in advance.
- Next message: Erschwitz: "Service Pack 3A problems"
- Previous message: Andras Jakus: "RE: mastlog.ldf"
- Next in thread: Aaron Bertrand [MVP]: "Re: formatdatetime inserts 1/1/1900 instead of current date"
- Reply: Aaron Bertrand [MVP]: "Re: formatdatetime inserts 1/1/1900 instead of current date"
- Reply: Aaron Bertrand [MVP]: "Re: formatdatetime inserts 1/1/1900 instead of current date"
- Reply: John Bell: "Re: formatdatetime inserts 1/1/1900 instead of current date"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|