Category >
ASP.NET
|| Published on :
Tuesday, September 22, 2020 || Views:
1277
||
Get current date time convert it into local time in c#
Here Pawan Kumar will explain how to Get current date time from server and convert it into local time in c#
Code Snippets
TimeZoneInfo INDIAN_ZONE = TimeZoneInfo.FindSystemTimeZoneById("India Standard Time");
DateTime indianTime = TimeZoneInfo.ConvertTimeFromUtc(DateTime.UtcNow, INDIAN_ZONE);
Get the datetime
indianTime.ToString()