VB Date formating Update problem

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Ian (ian_at_NoWhere.com)
Date: 09/08/04


Date: Wed, 8 Sep 2004 12:44:26 +0100

Hi

I am using ADO, VB6 and MS SQL Server 2000

Why is it that when I run this statement I get the wrong date format and
date

sSQL = "UPDATE tbl_MyTable SET tbl_BTP_Scenario.UpdateDate = " & Date()
sSQL = sSQL & " WHERE tbl_BTP_Scenario.ScenarioID=" & glScenarioID

adoCON.Execute sSQL

The UpdateDate Field ends up with 01/01/1900

I remember there being a formatting issue with dates but I can't remember
how to fix it.

Thanks

Ian



Relevant Pages

  • Re: mm/dd/yyyy format question
    ... I was not talking about how .Net or SQL Server stores date/time values ... I get the impression that you are talking about ISO 8601 in terms ... applications use the format for unambiguously representing date/time ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Querying on dates in dd/mm/yyyy hh/mm/ss format using Access2002 And SQL Server 7
    ... For parsing a string to a date/time, the 103 format doesn't limits the user ... > which is used as the row source for the results form). ... > other solutions assuming I have to use SQL Server 7? ... > I don't understand how I can use parameterized stored procedures to solve ...
    (microsoft.public.access.adp.sqlserver)
  • Re: Moving a VBA function to SQL server
    ... "String Functions " in Books Online. ... The SQL server database contains a table named 'WorkOrders'. ... This will produce a job header formatted like this: ... The format he specifies is stored in table 'Settings' - field 'JobHdrMask' ...
    (comp.databases.ms-access)
  • Re: unicode textbox problem
    ... I get the data in the above format from SQL server. ... If I move the same data into an asp:textbox, or an html input textbox, I ... But I need this to show the Chinese characters. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: mm/dd/yyyy format question
    ... "what is the logical way to configure server, sql server or program so ... it always deals with date as mm/dd/yyyy format". ... ISO 8601 specific to Asian countries? ... If the original question had been about what .Net classes/objects to ...
    (microsoft.public.dotnet.languages.vb)