formatdatetime inserts 1/1/1900 instead of current date

From: rapp25 (rapp25_at_hotmail.com)
Date: 03/31/04


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.



Relevant Pages

  • formatdatetime inserts 1/1/1900 instead of current date
    ... I am starting to rip my hair out. ... The fields in sql all smalldatetime. ...
    (microsoft.public.sqlserver.programming)
  • Can 2 installation of MSDE coexist on one PC ?
    ... If I install, on the same machine, a second ... app using MSDE 2000 SP3 then the first app stops working. ... Rip 1 = C:\temp\FDT1000.exe ... Microsoft SQL Server Desktop Engine (FDT) ...
    (microsoft.public.sqlserver.msde)
  • Re: Convert EPS-illustrations from MAC to PC
    ... your best bet probably wouldnt be C#, but rather Photoshop or some ... batch-image processing program. ... You'd probably rip your hair out before you could do it yourself with ...
    (microsoft.public.dotnet.general)
  • Re: Y&R-Nicki in real life is 50
    ... Missing Ann Richards, RIP http://www.youtube.com/watch?v=PUqLWTQCeHM ... to say the hell with the stereotypes (being in a physical rehab center ... My buddy is a partial Quad and he wears his hair long but tied ...
    (rec.arts.tv.soaps.cbs)
  • Re: Error: DRIVER_IRQL_NOT_LESS_OR_EQUAL, Blue screen of Death
    ... > I had a problem with my power-saving mode on my new motherboard that ... > made me want to rip my hair out, it was fixed when I disabled it and ...
    (microsoft.public.win2000.networking)