A useful function might be the following
Function getSQLDate(datDate As Date, Optional strFormat As String) As String 'breaks down date to insert into a SQL string Dim strDateDD As String, strDateMM As String, strDateYYYY As String
Dim strDateDD As String
Dim strDateMM As String
Dim strDateYYYY As String
strDateDD = Format(datDate, "dd")
strDateMM = Format(datDate, "mm")
strDateYYYY = Format(datDate, "yyyy")
Select Case strFormat
Case "mdy"
getSQLDate = strDateMM & "/" & strDateDD & "/" & strDateYYYY
Case "dmy"
getSQLDate = strDateDD & "/" & strDateMM & "/" & strDateYYYY
Case Else
getSQLDate = strDateMM & "/" & strDateDD & "/" & strDateYYYY
End Select
End Function
use the getSQLdate for example as follows
dim usedate as date
Usedate = #20/04/2006#
Call assign_status(tbl_name, "default_e57xx_db ", getSQLDate(Usedate, "mdy") , "3.9")