Back to list
Views:   6.8K
Replies:  1

"Input string was not in a correct format."

I have an object that has datetime properties and I'm not able to execute the code below.

I create a new object and set the values then call insert. 

It appears the sql isn't surrounding the datatime values so SQL Server is not able to interpret.


Any thoughts?

tim muska, Sep 29, 2015
Reply 1
Hello Tim: 

Not sure what you mean with "the sql isn't surrounding the datetime values".
Do you mean quotes or square brackets?

Also, your sample code does not show anything about obj, so there is not much we can tell you.
Could you include the obj class definition and the values assigned?

Jack Poorte, Oct 12, 2015
Stay Inspired!
Join other developers and designers who have already signed up for our mailing list.
Terms     Privacy     Cookies       Do Not Sell       Licensing      
Made with    in Austin, Texas.  - vsn 44.0.0
© Data & Object Factory, LLC.