
GetDBDate – Formatting a date as a DateSerial for Access
‘ Format a date as a DateSerial for Access’ Example: Debug.Print GetDBDate(date)Public Function GetDBDate(sDate As String) As String On Error GoTo ERROR_GetDBDate Dim sTmp As String If IsDate(sDate) = False Then sTmp = sDate Else sTmp = “DateSerial(” & Year(sDate) & “, ” & Month(sDate) & “, ” & Day