public static TimeFormat ( System date, TimeFormats format ) : String | ||
date | System | Time variable to format. |
format | TimeFormats | Time format. |
return | String |
public static String TimeFormat(System.DateTime date, TimeFormats format)
{
string thedate = string.Empty;
try
{
switch (format)
{
case TimeFormats.Standard:
thedate = date.ToString("h:mmtt");
break;
case TimeFormats.SqlMilitary:
thedate = date.ToString("HH:mm:ss");
break;
case TimeFormats.Military:
thedate = date.ToString("HH:mm");
break;
default:
thedate = date.ToString("h:mmtt");
break;
}
}
catch
{}
return (thedate);
}
H3Temporal::TimeFormat ( string date, TimeFormats format ) : String |