by ssi
13. January 2016 09:48
DateTime dStopCLock = DateTime.Now;
TimeSpan ts = dStartCLock - dStopCLock;
double differenceInSeconds = ts.TotalSeconds;
ts = TimeSpan.FromSeconds(ts.TotalSeconds);
string sDuration = string.Format("Dur: {0:D2}h:{1:D2}m:{2:D2}s",
ts.Hours,
ts.Minutes,
ts.Seconds);
Console.WriteLine(sDuration);
5aef155f-74f4-428e-bcb0-6260f4f008eb|0|.0|96d5b379-7e1d-4dac-a6ba-1e50db561b04
Tags: Timespan
CSharp
by ssi
13. August 2015 15:38
TimeSpan tsSystime = DateTime.Now.TimeOfDay;
if (tsSystime.Minutes >= 0 & tsSystime.Minutes <= nMinutes)
{
MessageBox.Show(sText, "Database Restoring", MessageBoxButtons.OK, MessageBoxIcon.Hand);
bRet = false;
}
4593d55f-304e-44db-a146-a0f484ebadc5|0|.0|96d5b379-7e1d-4dac-a6ba-1e50db561b04
Tags: Timespan, DateTime
CSharp