I'm trying to enter the current date into the table through code but there's an error in inserting the date.
Whats wrong with this code:
strSQL = "INSERT INTO University ([UniversityID], [BranchID], [DateOpened])"
strSQL = strSQL & "VALUES ( " & intUnivId & " , " & strBranchID & ", " & Date() & " );"
I don't know how to make the Date a string in order to run in the SQL statement.
Or should I leave it as it is without quotation marks.
Whats wrong with this code:
strSQL = "INSERT INTO University ([UniversityID], [BranchID], [DateOpened])"
strSQL = strSQL & "VALUES ( " & intUnivId & " , " & strBranchID & ", " & Date() & " );"
I don't know how to make the Date a string in order to run in the SQL statement.
Or should I leave it as it is without quotation marks.
Comment