Just nu i M3-nätverket
Jump to content

Tidsberäkning


Loka_2012

Recommended Posts

Hur beräknar man fram ex. 15:00 till 06:00 blir 15 timmar ?

 

ex textbox1=15:00, textbox2=06:00 och resultatet står i textbox3...

Link to comment
Share on other sites

Dim a As DateTime = new DateTime(2014,4,5, 15,0, 0)
Dim b As DateTime = new DateTime(2014, 4, 6, 6, 0, 0)
Dim result As TimeSpan = b - a
Textbox3.Text = result.TotalHours.ToString()
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.



×
×
  • Create New...