[edit] C# DateTime Second Property
The DateTime Second property simply returns the second part of a datetime object which will be between 0 to 59.
[edit] Syntax
int second = variable.Second;
[edit] Example
using System;
class Program
{
static void Main()
{
DateTime variable = DateTime.Now;
int second = variable.Second;
Console.WriteLine(second);
Console.Read();
}
}
Output:
51
The results will vary depending on when you run this code.
<= DateTime Tutorial
|