Hi,
Could anyone please help me with this? I am trying to insert a date value into my database.
In my code there is a line that requests the date:
Request("payment_date"
And I am trying to insert that value into my database, the code is something like this:
strSQL="INSERT INTO Sold (SoldDate) VALUES ( #" & payment_date & "#)"
But I kept getting errors.
I have tried to switch the #" & payment_date & "# to
#' & payment_date & '#
"# & payment_date #"
'" & payment_date "'
'# & payment_date #'
'"# & payment_date #"'
But they all don't work, either I get a datatype mismatch error or expected end error.
I am pretty sure the error is at #" & payment_date & "#, but just don't know how to fix it. Please advice.
Thanks in advance.
Could anyone please help me with this? I am trying to insert a date value into my database.
In my code there is a line that requests the date:
Request("payment_date"
And I am trying to insert that value into my database, the code is something like this:
strSQL="INSERT INTO Sold (SoldDate) VALUES ( #" & payment_date & "#)"
But I kept getting errors.
I have tried to switch the #" & payment_date & "# to
#' & payment_date & '#
"# & payment_date #"
'" & payment_date "'
'# & payment_date #'
'"# & payment_date #"'
But they all don't work, either I get a datatype mismatch error or expected end error.
I am pretty sure the error is at #" & payment_date & "#, but just don't know how to fix it. Please advice.
Thanks in advance.