Time & Date
C#
4
Posts
4
Posters
0
Views
1
Watching
-
How does one get the current date and time in C#. Is there any readymade class.
-
How does one get the current date and time in C#. Is there any readymade class.
deepscyberpulse wrote:
How does one get the current date and time in C#. Is there any readymade class.
DateTime.Now
Share and enjoy. Sean -
How does one get the current date and time in C#. Is there any readymade class.
-
How does one get the current date and time in C#. Is there any readymade class.
Hi, you can use this: label1.Text = DateTime.Now.ToLongDateString(); //date label2.Text = DateTime.Now.ToLongTimeString(); //time Regards, Alberto Martinez