Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I was writing a routine to read from an Excel spreadsheet.

I have just discovered thro that MS Excel spreadsheet that

1 microsoft second = 0.00001157407407

1/1/1900 0:00:01.000    1.000011574
1/2/1900 0:00:02.000    2.000023148

Why?

Why not 0.00001, or some rounder number?

What is the significance of 0.00001157407407?

Binary value = 0.00000000000000001100001000101110

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
751 views
Welcome To Ask or Share your Answers For Others

1 Answer

In Excel, each day is represented by 1.0, with a value of 1.0 being equal to January 1st, 1900 (ie: it's effectively the days since 12/31/1899, plus one if you're after Feb 1900).

This works out to each second being the number you posted, which is effectively 1 day / (24 * 60 * 60) or 1 / 86400 == 0.00001157407407.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share

548k questions

547k answers

4 comments

86.3k users

...