I am Importing data from excel and inserting into a sql table. One of the fields in my Excel file is populated with a time value. I want to import that time value as a string into my sql table. When i do that i get a weird value in my sql table. Excel value is: 07:00 and after inserting that as a string into the sql table the time values looks like this: 0,29166666667.
The reason for importing it as a string value is that you have to be able to define Days in the same field. Like this : D2 10:30. When i import this kind of values it is inserted correctly.
can anyone help ?
07:00on the screen in Excel, but that's just the formatting. How exactly are you picking this value up to be inserted into SQL? I'm willing to bet that you're using VBA and picking up the range's value? If so, debug your code and stop immediately after you've selected that value into a VBA variable, then have a look at what you're really inserting into SQL.