I've the datetime stored in UTC format in my database. I want to have a common API that should convert the datetimes format(mm/dd/yyyy
or dd/mm/yyyy
) according to the browser culture/locale
of the user using the application.
Currently I'm using
string temp = DateTime.Today.ToString("MM/dd/yy", ,DateTimeFormatInfo.InvariantInfo);
Also, in javascript how can I take care for the same. Any help is appreciated.
Thanks