S
SeenivasaPrabu
Guest
static TimeZoneInfo tz = TimeZoneInfo.FindSystemTimeZoneById("India Standard Time");
static DateTime UTCPingTime = TimeZoneInfo.ConvertTimeFromUtc(new DateTime(1970, 1, 1), tz);
long dftDate = 1579583926000;
DateTime dt = UTCPingTime.AddSeconds(dftDate);
string dateTime = dt.ToString("dd-MMM-yyyy HH:mm:ss");
Console.WriteLine(dateTime);
Hi,
The above code is working fine with long time format as HH:mm:ss in Control Panel-->Region Section (Windows 10).
Suppose When we are changing the long format to h.mm.ss tt then the above code, format convertion is not working.
Regards
Prabu SP
Continue reading...
static DateTime UTCPingTime = TimeZoneInfo.ConvertTimeFromUtc(new DateTime(1970, 1, 1), tz);
long dftDate = 1579583926000;
DateTime dt = UTCPingTime.AddSeconds(dftDate);
string dateTime = dt.ToString("dd-MMM-yyyy HH:mm:ss");
Console.WriteLine(dateTime);
Hi,
The above code is working fine with long time format as HH:mm:ss in Control Panel-->Region Section (Windows 10).
Suppose When we are changing the long format to h.mm.ss tt then the above code, format convertion is not working.
Regards
Prabu SP
Continue reading...