Answers for "get the hour in c# to int"

C#
1

how to get hours and minutes from second in c#

TimeSpan t = TimeSpan.FromSeconds( secs );

string answer = string.Format("{0:D2}h:{1:D2}m:{2:D2}s:{3:D3}ms", 
                t.Hours, 
                t.Minutes, 
                t.Seconds, 
                t.Milliseconds);
Posted by: Guest on December-29-2021
0

how to get the hour on c#

String foo = DateTime. Now. ToString("HH:mm");
  console.Write(foo);
//time
Posted by: Guest on February-09-2021

C# Answers by Framework

Browse Popular Code Answers by Language