How can I set the time to 00:00:00, now i set it to
DateTime startTine=DateTime.Now
but i want to show the time as 0 everytime and run the calculation from that(0)starting time........
micahgeorge 0 Newbie Poster
Recommended Answers
Jump to PostIf you are using DateTime, then you get the Date. TimeSpan might be better for what you want to do, or using a Stopwatch if you are timing things..
Jump to PostTo set the dateTime to 00:00:00 you can only do:
DateTime startTine=DateTime.Today;
Where exactly do you use this code - in what kind of calculation? If you are doing with counters, its better to you TimeSpan as Momerath said a post above.
Give me some more code, …
All 6 Replies
Momerath 1,327 Nearly a Senior Poster Featured Poster
micahgeorge 0 Newbie Poster
Momerath 1,327 Nearly a Senior Poster Featured Poster
ddanbe commented: Nice advice. +8
Mitja Bonca 557 Nearly a Posting Maven
micahgeorge 0 Newbie Poster
Momerath 1,327 Nearly a Senior Poster Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.