Questions tagged as 'timespan'

3
answers

Write 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 that the event occurred....
asked by 24.08.2015 / 19:26
2
answers

Sum of TimeSpan in C #?

In the sum of two variables of type TimeSpan with the language c # I could see that it happens as if it were a mathematical operation of two simple numbers, example : TimeSpan t1 = TimeSpan.ParseExact("00:01:45", "c", CultureInfo.Invari...
asked by 06.06.2017 / 22:27
1
answer

How do I 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 System.DateTime TempoRevisado { get; set; } TempoRevis...
asked by 14.10.2015 / 03:21
2
answers

How to decrease TimeSpan time?

I need to set a time within TimeSpan , and make it shorten the time. When you get to [00:00:00], for the time. I need to do this format: [00:00:00] - hour, minute, and second. Below, I put 5 min. private void timer1_Tick(object sender...
asked by 08.02.2018 / 21:48
1
answer

Returning difference between dates with days and months

I'm developing a C # function that calculates the interest applied to a particular account. for this it is necessary to know the correct difference between days and months. How can you perform a function in C # that returns the number of days...
asked by 19.07.2017 / 00:46
1
answer

TimeSpan Conversion

I'm reading a file delimited by a 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, it obviously gives error    The TimeSpan could not be parsed because at le...
asked by 19.05.2017 / 18:31
1
answer

Display a TimeSpan formatted time

I have two variables: TimeSpan horaI = new TimeSpan(10, 00, 00); TimeSpan horaF = new TimeSpan(22, 00, 00); I need to display them on the screen as follows 10:00 AM and 10:00 PM. But I can not do it. How could I do this?...
asked by 10.11.2015 / 14:24
1
answer

As popular dropdwonlist with AM datetime value and another dropdwonlist with PM C # value

Question: How popular is a dropdownlist with value datetime AM and another dropdownlist with PM value in C #. private static void FillTimeDropDown(DropDownList dropDownList) { TimeSpan startTime = new T...
asked by 31.07.2018 / 16:50