Lotus/Microsoft date to julian date

本文介绍了如何将Lotus/Microsoft的日期格式转换为儒略日期格式。由于Lotus/Microsoft的基日期1900年1月1日存在一天的偏差,需要进行调整。正确的转换方法是在Lotus/Microsoft日期数值基础上加2415019。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

   Base date used by Lotus/Microsoft is 1/1/1900, but an extra day is
  tossed in between then and now because both incorrectly assume 
   that 2/29/1900 is a valid date (1900 is not a leap year). Microsoft 
   still does this for backwards compatibility. Thus the correct 
   adjustment to go from a Lotus/Microsoft date number to a julian date
   number is to add julian(1/1/1900) - 2 = 2415021 - 2 = 2415019.

julian = (int) (lotusdate+ 2415019);

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值