Created
January 17, 2021 23:53
-
-
Save ProIntegritate/b2d9be87837c97918a0f9ad939b87f74 to your computer and use it in GitHub Desktop.
TimeToBiden in .NET
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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