Most voted "timespan" questions
8 questions
Sort by count of
-
18
votes3
answers1166
viewsWrite Timespan in full
I want to write a static class (can be Extension) to represent the value of a structure TimeSpan in full, in Portuguese. The idea is to always compare the current date (Datetime.Now) with the date…
-
12
votes2
answers675
viewsSum of Timespan in C#?
In the sum of two variables of the type Timespan with the language c# I was able to observe that it happens as if it were a mathematical operation of two simple numbers, example: TimeSpan t1 =…
-
4
votes1
answer269
viewsHow to calculate with 3 variables of type Datetime?
I have these 4 variables: public System.DateTime TempoOtimista { get; set; } public System.DateTime TempoProvavel { get; set; } public System.DateTime TempoPessimista { get; set; } public…
-
3
votes1
answer9941
viewsReturning difference between days and months
I am developing a C# function that calculates the interest applied to a given account. for this it is necessary to know the correct difference between days and months. How is it possible to execute…
-
2
votes1
answer119
viewsTimespan conversion
I am reading a file delimited by semicolon and one of the information that is the duration of the link is coming as "00:97:54". When trying to convert to Timespan, obviously gives error The Timespan…
-
2
votes2
answers290
views -
1
votes1
answer63
viewsDisplay a formatted Timespan time
I have two variables: TimeSpan horaI = new TimeSpan(10, 00, 00); TimeSpan horaF = new TimeSpan(22, 00, 00); I need to present them on the screen as follows 10:00 and 22:00. But I’m not getting it.…
-
0
votes1
answer52
viewsAs popular dropdwonlist with datetime AM value and another dropdwonlist with PM C#
Question: As popular a dropdownlist worthwhile datetime AM and other dropdownlist with PM value in C#. private static void FillTimeDropDown(DropDownList dropDownList) { TimeSpan startTime = new…