Entries Tagged as ''

Remote Desktop Connection Beta 3 is Out

If you were using the Beta 2 version of the RDC client from microsoft and were a little flustered that it expired without a new version to upgrade to, you’re in luck. The new beta is out. And this one doesn’t expire!

Get it here:

Download Remote Desktop Beta 3

RDC

Subtracting Dates in .NET

This may be simple for a lot of .NET developers out there, but for a person like me (coming from classic asp), this was a little tricky.

Problem, I need to know the # of days between 2 dates.

In ASP, I used to use the DateDiff function, and it worked (most of the time). But it’s pretty convoluted and a pain to remember. From just winging it, I’ve come up with this for .NET:

Dim arrThisSplitDate As Array
Dim strThisDate As String = ""
Dim intDaysDifference As Integer

arrThisSplitDate = Split(CDate(strThisPremiumEndDate), "/")

strThisDate = DateSerial(arrThisSplitDate(2), arrThisSplitDate(1), arrThisSplitDate(0))

iintDaysDifference = DateTime.Today.Date.Subtract(strThisDate).Days

This will return you an integer value for the difference in days.

.word.