减去两个日期以获得之间的天数
我如何从两个日期开始更新和结束日期并从
enddate中减去startdate以计算两者之间的天数?谢谢
How would i take two dates startdate and enddate and subtract startdate from
enddate to figure the number of days between the two? thanks
[" Followup-To:"标题设置为microsoft.public.dotnet.languages.vb。]
2003-11-19,Brian Henry< br ****** @ adelphia.net>写道:
["Followup-To:" header set to microsoft.public.dotnet.languages.vb.]
On 2003-11-19, Brian Henry <br******@adelphia.net> wrote:
我如何从两个日期开始更新和结束日期并从结束日期中减去startdate来计算两者之间的天数?谢谢
How would i take two dates startdate and enddate and subtract startdate from
enddate to figure the number of days between the two? thanks
Dim Difference As TimeSpan = enddate.Subtract(startdate)
Console.WriteLine(Difference.Days)
-
Tom Shelton
[MVP - Visual Basic]
Dim Difference As TimeSpan = enddate.Subtract(startdate)
Console.WriteLine(Difference.Days)
--
Tom Shelton
[MVP - Visual Basic]
布莱恩亨利 <峰; br ****** @ adelphia.net> schrieb
"Brian Henry" <br******@adelphia.net> schrieb
我如何从startdate和enddate中取两个日期并从enddate中减去
startdate以计算两者之间的天数?
感谢
How would i take two dates startdate and enddate and subtract
startdate from enddate to figure the number of days between the two?
thanks
我认为问题不是针对asp.net的。
为了得到差异:
Dim Diff As Timespan
diff = enddate.subtract(startdate)
msgbox diff.days
-
Armin
http://www.plig.net/ nnq / nquote.html
http:// www .netmeister.org / news / learn2quote.html
I think the question is not specific to asp.net.
To get the difference:
Dim Diff As Timespan
diff = enddate.subtract(startdate)
msgbox diff.days
--
Armin
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html
neverminde :)
If DateDiff (DateInterval.Day,dbReader(" sectionedited"),Now.Date)< = 30
然后
" Brian Henry" <峰; br ****** @ adelphia.net>在消息中写道
news:uE ************** @ TK2MSFTNGP10.phx.gbl ...
neverminde :)
If DateDiff(DateInterval.Day, dbReader("sectionedited"), Now.Date) <= 30
Then
"Brian Henry" <br******@adelphia.net> wrote in message
news:uE**************@TK2MSFTNGP10.phx.gbl...
我怎么拿两个date startdate和enddate并从enddate减去startdate
来计算两者之间的天数?谢谢
How would i take two dates startdate and enddate and subtract startdate from enddate to figure the number of days between the two? thanks