0

I am using Python v2.7 on Windows 7 OS. My goal is using Python to generate a CSV file which contains date, time, etc.

The question is, the CSV outputs of time are different btw txt format and excel format. Here are some details.

If I use txt to open CSV file, it is good. The output is like: 2016-03-07,15:16:04.003000,...

But when I open the same CSV file with excel, the output of time is not fully displayed: in excel
You may notice from the top line that, the full display of time is actually there. But from row 2, it is incomplete.

Please advice. Thanks!

Amber.G
  • 1,343
  • 5
  • 12
  • 16

2 Answers2

1

In Excel, select the "time value" cell and mouse right click --> Format Cell --> Number --> custom --> input Type as mm:ss.000000

Customize number display

Yunhe
  • 665
  • 5
  • 10
  • Thanks for the input Yunhe. I tried it out. The target is fully display 3:16:04. I customize the format on Format Cells, but it seems that only 16:04.### customized, I did see '3' in there... :'( – Amber.G Mar 07 '16 at 23:55
  • I think I figure it out, I just modify the last step on your idea. Thank you Yunhe! – Amber.G Mar 07 '16 at 23:58
0

Problem solved by 'select the "time value" cell and mouse right click --> Format Cell --> Number --> custom --> input Type as h:mm.ss. Thanks for the hint from Yunhe!

Amber.G
  • 1,343
  • 5
  • 12
  • 16