Excel stores dates and times as numeric values from 0 to 0.99999999 + x days.
0.29166666667 will be like 00.01.1900 07:00:00 , which seems correct in your case.
So, you will need to use some reformatting or conversion of this value before using it as direct line input.
In VBA, you can use Format(myValue,"DD-MM-YYYY hh:mm:ss") .
The equivalent function of the worksheet will be TEXT(A1,"DD-MM-YYYY hh:mm:ss") .
The format code depends on your regional settings. You might want to try something like this Format(myTime, "Long Time") if you prefer to use time-forced time formats.
Since you have not published any code, I am not sure how you import your excel data. But I would say that the fastest way to get the best results is to create a new column using the TEXT formula with reference to the previous time column and use this new formatted column as input for your sql-db.
source share