Jump to content

Insert Date Value


This topic is 2930 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hi all

At my wit's end with this one. I've got an INSERT VALUES SQL command, but it will not insert a date value:

SMExecuteSQL ( "INSERT INTO Log (Log_Personnel_IDF,Log_Date)
VALUES (" & $$Personnel_ID & ",'20/03/2016')")

It is absolutely fine with all other value types, just not the date one. I get an 8309 error. I have tried different date formats, and get (currentdate) - which is what I really need to populate the new record.

Link to comment
Share on other sites

I've resolved this by using 'SELECT' instead of 'VALUES', and specifying the source date value within a proper field. Using Values would be a bit neater but not a big deal.

Link to comment
Share on other sites

This topic is 2930 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.