rwheeler23
asked on
C# read datews in Excel and wtite them to SQL as datetime.
I am reading an Excel spreadsheet and one of the columns is a date column.
Sending the date to the string using MessageBox.Show(xlRange.Cells[i, j].Value2.ToString()) yields 10/23/2023. I need to convert this to a datetime value that I can then pass down to a SQL stored procedure.
I have attached code from another application that converts the Excel date to a string.
What would I need to do to this code to get it to return a datetime value?
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.