如何计算日期差异? [英] How to calculate date difference?
本文介绍了如何计算日期差异?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想用年,月,日,星期计算2日期之间的差异。
我该怎么做?
I want to calculate difference between 2 date in terms of year,month,days,week.
How can I do this??
推荐答案
虽然它说.NET 2003,它仍适用于当前版本:
代码:确定两个日期之间的跨度(Visual C#) [ ^ ]
While it says .NET 2003, it still applies to the current version:
Code: Determining the Span Between Two Dates (Visual C#)[^]
这篇关于如何计算日期差异?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文