M
muybn
I am trying to insert a date with format "2008-10-21" into an Access database
but the first line shown in the code below inserts "1997" (obviously using
the dashes as minus signs). What would be the correct format to do what I
want?
strDate = Format(Date, "yyyy-MM-dd")
Set csConn = CreateObject("adodb.connection")
csConn.ConnectionString = "data source=C:\Data\0\jbDB.mdb;
Provider=Microsoft.Jet.OLEDB.4.0"
csConn.Open
strSQL = "UPDATE jbDBTable SET Sent =" & strDate & " where jbID =" & strID
csConn.Execute strSQL
csConn.Close
but the first line shown in the code below inserts "1997" (obviously using
the dashes as minus signs). What would be the correct format to do what I
want?
strDate = Format(Date, "yyyy-MM-dd")
Set csConn = CreateObject("adodb.connection")
csConn.ConnectionString = "data source=C:\Data\0\jbDB.mdb;
Provider=Microsoft.Jet.OLEDB.4.0"
csConn.Open
strSQL = "UPDATE jbDBTable SET Sent =" & strDate & " where jbID =" & strID
csConn.Execute strSQL
csConn.Close