C# Program to Find the Local Time

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using System.Threading.Tasks;

using System.Xml;


namespace ConsoleApp

{

     class Program

    {

        static void Main(string[] args)

        {

            DateTime date = DateTime.Now;

            DateTime LocalDateTime = date.ToLocalTime();

            Console.WriteLine("The Local Time is : "+LocalDateTime);

            Console.ReadKey();


        }

    }

}


Output:-

The Local Time is : 05-19-2025 13:42:28

एक टिप्पणी भेजें

0 टिप्पणियाँ