Skip to content

Instantly share code, notes, and snippets.

@ProIntegritate
Created January 17, 2021 23:53
Show Gist options
  • Save ProIntegritate/b2d9be87837c97918a0f9ad939b87f74 to your computer and use it in GitHub Desktop.
Save ProIntegritate/b2d9be87837c97918a0f9ad939b87f74 to your computer and use it in GitHub Desktop.
TimeToBiden in .NET
Dim sOutput As String = ""
Dim inaug As DateTime = Convert.ToDateTime("2021-01-20T17:00:00.000Z") ' Timestamp in ISO8601 format.
Dim ttb As System.TimeSpan
ttb = inaug - Convert.ToDateTime(Now.ToString)
sOutput = "Seconds: " & ttb.TotalSeconds & vbCrLf ' Total seconds left
sOutput = sOutput & "Time left: " & ttb.ToString & " Local" & vbCrLf ' Time in Local zone
ttb = inaug - Convert.ToDateTime(Date.UtcNow.ToString)
sOutput = sOutput & "Time left: " & ttb.ToString & " UTC" & vbCrLf ' Time in UTC zone
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment