c# - Remove seconds from local time but keep format -
assume have utc time string converted local time:
utctimestring.tolocaltime().tostring(); => "01/31/2012 12:00:00 pm" how remove seconds result string keep format (set in phone settings?)
thanks!
utctimestring.tolocaltime().tostring("mm/dd/yyyy hh:mm tt"); http://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx
as alternative, can use
string.format("{0:d} {0:t}",utctimestring.tolocaltime()); string.format("{0:g}",utctimestring.tolocaltime());
Comments
Post a Comment