首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >是否根据VB.Net中的其他两个日期替换“到期”日期?

问是否根据VB.Net中的其他两个日期替换“到期”日期?
EN

Stack Overflow用户
提问于 2010-09-22 06:29:57
回答 1查看 400关注 0票数 0

我想得到一个‘到期’或预计检验日期的基础上与另一个日期交替?我该怎么做呢?

谢谢!

代码语言:javascript
复制
Enum EnumSiteInspectionFrequency As Integer ' alternating with WRA
            None = 0  ' None
            Yearly = 12  '12 months
            SecondYearly = 24  '24 months
End Enum

Sub Calculate()
Dim SiteName as String = "Worksite Name Here"
Dim SiteInspectionFrequency = EnumSiteInspectionFrequency.SecondYearly

' Dates
Dim LastInspection As Date = DateTime.Parse("01/01/2010")
Dim LastSafetyInspection As Date = DateTime.Parse("22/03/2010")

Dim DueInspection As Date

' The due inspection either can be 24 months (second yearly) but it has to alternate with the last safety inspection.

End Sub
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2010-09-24 18:35:49

使用vb.net时间跨度回答问题

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/3764977

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档