• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

How to insert null as a value for the sql table DateTime column from excel?

ravikumar00008

New Member
Hi All,


i am able to insert the values from excel sheet columns data to the corresponding columns of an sql table.


But the problem is


in my execl sheet i have some date columns.In those some rows are having data(date) and some rows are empty.


Now when i am sending these data to a datetime column of sql table,the rows which are having dates are showing as it is.But the rows which are empty are showing with a default date(1900-01-01 00:00:00.000) in the sql table.


But i need Null instead of 1900-01-01 00:00:00.000.


If i check by inserting the null values from sql.I am getting null values to the date columns.


Note:I didn't use notnull constraint.


Please lt me know how can i achieve like this?


Thanks in advance


Regards

Kumar
 
Hi, ravikumar00008!

Could you please upload a sample Excel file with data, the code used for inserting values into the SQL table, the database engine used to store the SQL database and the table and field definitions for the related columns? Thank you.

Regards!
 
Back
Top