n*******e 发帖数: 107 | 1 想在excel里把日期从整数offset到Julian,怎么整都差1。
结果查了半天错误,终于明白了:"1901/1/1"-"1900/1/1"=366,大家可以试试看
微软把1900年当闰年了,吐吐吐啊
不知道其他的年份会不会搞错。。。 |
w******0 发帖数: 80 | |
n*******e 发帖数: 107 | 3 1900不是闰年
四年一闰
百年不闰
四百年再润
【在 w******0 的大作中提到】 : 有什么错? : 1900不就是闰年吗?
|
n*******e 发帖数: 107 | 4 原来这是个著名问题了:
This is because Excel behaves as if the date 1900-Feb-29 existed. It did
not. The year 1900 was not a leap year (the year 2000 is a leap year). In
Excel, the day after 1900-Feb-28 is 1900-Feb-29. In reality, the day after
1900-Feb-28 was 1900-Mar-1 . This is not a "bug". Indeed, it is by design
. Excel works this way because it was truly a bug in Lotus 123. When Excel
was introduced, 123 has nearly the entire market for spreadsheet software.
Microsoft decided to continue Lotus' bug, in order to fully compatible.
Users who switched from 123 to Excel would not have to make any changes to
their data. As long as all your dates later than 1900-Mar-1, this should
be of no concern.
看来后面的年份不用担心。。。
【在 n*******e 的大作中提到】 : 想在excel里把日期从整数offset到Julian,怎么整都差1。 : 结果查了半天错误,终于明白了:"1901/1/1"-"1900/1/1"=366,大家可以试试看 : 微软把1900年当闰年了,吐吐吐啊 : 不知道其他的年份会不会搞错。。。
|
p******i 发帖数: 1358 | 5 在Julian 里四年一闰,1900年是闰年
于是人们在1582年2月24日开始使用gregorian calendar也就是100年97闰的这个
【在 n*******e 的大作中提到】 : 想在excel里把日期从整数offset到Julian,怎么整都差1。 : 结果查了半天错误,终于明白了:"1901/1/1"-"1900/1/1"=366,大家可以试试看 : 微软把1900年当闰年了,吐吐吐啊 : 不知道其他的年份会不会搞错。。。
|
w******0 发帖数: 80 | 6
did
year). In
after
design
Excel
software.
compatible.
changes to
should
一直以为是4年一闰
挺有趣的
【在 n*******e 的大作中提到】 : 原来这是个著名问题了: : This is because Excel behaves as if the date 1900-Feb-29 existed. It did : not. The year 1900 was not a leap year (the year 2000 is a leap year). In : Excel, the day after 1900-Feb-28 is 1900-Feb-29. In reality, the day after : 1900-Feb-28 was 1900-Mar-1 . This is not a "bug". Indeed, it is by design : . Excel works this way because it was truly a bug in Lotus 123. When Excel : was introduced, 123 has nearly the entire market for spreadsheet software. : Microsoft decided to continue Lotus' bug, in order to fully compatible. : Users who switched from 123 to Excel would not have to make any changes to : their data. As long as all your dates later than 1900-Mar-1, this should
|
n*******e 发帖数: 107 | 7 就这么点破事儿浪费我一个小时 T_T
【在 w******0 的大作中提到】 : : did : year). In : after : design : Excel : software. : compatible. : changes to : should
|