timespan Questions
5
Solved
C# WPF Application
I have a SplashScreen being displayed at startup for a minimum amount of time by using
Thread.Sleep(int); //int = milliseconds to display splash screen
When that sleep time i...
Handcuff asked 3/11, 2012 at 21:22
14
Solved
I have two DateTime vars, beginTime and endTime. I have gotten the difference of them by doing the following:
TimeSpan dateDifference = endTime.Subtract(beginTime);
How can I now return a ...
1
Solved
I have a database where I save time as time() from php, which is seconds since 1 jan 1970.
Is there any way I can convert, for example 2012-12-12 to seconds since 1 jan 1970?
I want to do like:
...
Polythene asked 16/10, 2012 at 21:28
4
Solved
i am trying to output "900,000 milliseconds" in the format "days:hours:minutes:seconds" and I am using this code right now:
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("dd:HH:mm:ss");...
Glabrate asked 9/10, 2012 at 13:31
1
Solved
I have a Decimal value representing fractional number of hours in a time interval.
Now I need to sum this value to a TimeSpan, but I cannot find an effective method to do it.
My solution, for now...
2
Solved
I trying to format a TimeSpan to string.
Then I get expiration from MSDN to generate my customized string format.
But it don't words. It returns "FormatException".
Why? I don't understand...
var ...
Burdelle asked 22/9, 2012 at 11:33
2
Solved
Having a problem where DateTime/TimeSpan doesn't seem to deserialize properly with JavaScriptSerializer.
When I get the Object back after deserializing the TimeSpan is empty and if I use DateTime t...
Avocado asked 8/12, 2010 at 1:37
3
Solved
Is there a standard library method that converts a string that has duration in the standard ISO 8601 Duration (also used in XSD for its duration type) format into the .NET TimeSpan object?
For exa...
4
Solved
hello again my question if it is possible to print microsencods using TimesSpan in C#.
i have the next example:
DateTime startTime = DateTime.Now;
..../some code
DateTime endTime = DateTime.Now;
...
3
Solved
I am using the code
var minutesPassed = (DateTime.UtcNow - conversionsList.Last().DateStamp).TotalMinutes;
to calculate how much minutes passed between two dates. The result which I get looks li...
1
Solved
TimeSpan.Parse("23:00:00") returns 23 hours.
TimeSpan.Parse("24:00:00") returns 24 days!
I realize that I made a mistake in that the allowable range of hours is 0-23. But for minutes and seconds ...
4
Solved
I want to make a Windows Form Application which only shows a timer as:
xx days
xx hours
xx minutes
xx seconds
No option for setting the timer or anything, i want to do that in the code
However, ...
7
In ActionScript 3.0, is there an automatic way to calculate the number of days, hours, minutes and seconds between two specified dates?
Basicly, what I need is the ActionScript equivalent of the ....
Koster asked 3/10, 2008 at 22:49
8
Solved
I tried searching here, but it couldn't help me much ..
I want to convert time_span to string, I don't want to return the timespan in days .. but only HH:mm:ss. How to achieve that?
My sample co...
Geraldina asked 5/3, 2010 at 6:12
3
Solved
I have two calendars and each return a DateTime from calendar.SelectedDate.
How do I go about subtracting the two selected dates from each other, giving me the amount of days between the two selec...
1
Solved
I have a need to take a time period, e.g. a week and break it down into days and then further down into either hours, 30 minutes, 15 minutes etc.
Then I want to be able to assign (possibly multipl...
1
Solved
I have an ASP.NET WebApi project that utilizes Entity Framework 4.1. I am attempting to return an entity and leveraging JSON.net for deserialization. All is working well however when attempting to ...
Stane asked 11/5, 2012 at 14:26
0
Is there a good Timespan contorl for WPF? I'm looking for one that looks like the Timepicker from WPF Toolkit extended (small and compact). The examples I've seen from codeproject are too bulky for...
5
Solved
How do you elegantly format a timespan to say example "1 hour 10 minutes" when you have declared it as :
TimeSpan t = new TimeSpan(0, 70, 0);
?
I am of course aware that you could do some...
2
Solved
Is there a simple way to take a float value representing fractional hours and convert them into a TimeSpan object and visa versa? For example:
float oneAndAHalfHours = 1.5f;
float twoHours = 2f;
f...
3
Solved
I'm sure this must be simple, but I can't figure out how to word it correctly in Google...
I have a config which has a field:
TimeToPoll="1d"
Now I want to do something like:
TimeSpan.Parse(Ti...
4
In my c# program, my requirement is to calculate a timespan for business logic execution that is inside a foreach loop I have to store time span.
I am using following code
for (int i = 0; i < ...
1
Solved
I'm trying to do a Query with LINQ on ASP.NET MVC 3.
I have a model, lets call it Event. This Event object has a Date property, of DateTime?. What I want is to fetch the Events that are between 2 ...
Burgundy asked 3/4, 2012 at 19:52
4
Solved
How long is a .NET DateTime/TimeSpan tick?
3
Solved
I'm making a graph that cover "1930-1940", "1940-1950", "1950-1960", "1960-1970", ...
I want to represent this with a DateTime and a Timespan, but I'm not really sure how to make the TimeSpan, an...
Bidet asked 12/3, 2012 at 16:3
© 2022 - 2024 — McMap. All rights reserved.