question

RamUpadhayay-4742 avatar image
0 Votes"
RamUpadhayay-4742 asked Cathyji-msft edited

hello everyone , i need to map excel table date column in insert rows database.

when i am mapping excel result in insert rows it is giving me value like this 522655.76277 , and i want it in 21-jun-2021 12:00 AM format. can anyone please answer ?

sql-server-general
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Can you explain a little more closely what you are doing? Which statements are you using, if any? Are you copying data from Excel to SQL server, or the other way round?

0 Votes 0 ·

Hi @RamUpadhayay-4742 ,

We have not received a response from you. Any update for this thread?

0 Votes 0 ·
pituach avatar image
0 Votes"
pituach answered pituach edited

I am not sure what you are doing. Can you elaborate a bit more and maybe add screenshot?

If the issue is the way the Excel present the data then you simply need to make sure that the type of the cell in the Excel is DATE.

Right click in the Cell -> click on "Format Cells" -> select the type "Date" -> select the format that fit you

109527-image.png

109528-image.png



image.png (22.8 KiB)
image.png (31.2 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Cathyji-msft avatar image
0 Votes"
Cathyji-msft answered

Hi @RamUpadhayay-4742,

If you want the format value in Excel, please check the suggestion that pituach mentioned. But if you want the values include time, suggest you choose the option as below screenshot.
109751-screenshot-2021-06-28-105834.jpg

Or did you mean that using the insert into statement? If so, please check the solution from the similar thread.

SQL DATETIME Insert from Excel?


If the response is helpful, please click "Accept Answer" and upvote it, as this could help other community members looking for similar queries.




5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

OlafHelper-2800 avatar image
0 Votes"
OlafHelper-2800 answered

522655.76277

For Excel this is date 23.12.3330 18:18:23; so what's that a vlaue for?



5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.