C# hh:mm tt (12 Hours to 24 Hours Format) convert
using System.Globalization;
var cultureSource = new CultureInfo("en-US", false);
var cultureDest = new CultureInfo("de-DE", false);
var source = "03:00 PM";
var dt = DateTime.Parse(source, cultureSource);
Response.Write(dt.ToString("t", cultureDest));
using System.Globalization;
var cultureSource = new CultureInfo("en-US", false);
var cultureDest = new CultureInfo("de-DE", false);
var source = "03:00 PM";
var dt = DateTime.Parse(source, cultureSource);
Response.Write(dt.ToString("t", cultureDest));
No comments:
Post a Comment