public class TimeUtility
{
public static string getCurrentDateTime(DateTime date)
{
DateTime dt = date;
return dt.ToString("HH:mm tt dd MMM yyyy");
}
public static string getDate(string startdatetime)
{
long microSec = Convert.ToInt64(startdatetime);
DateTime converted = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc).AddTicks(Convert.ToInt64(microSec) * 10000);
return getCurrentDateTime(converted);
}
}
// App.strDateTime=TimeUtility.getCurrentDateTime(DateTime.Now);
{
public static string getCurrentDateTime(DateTime date)
{
DateTime dt = date;
return dt.ToString("HH:mm tt dd MMM yyyy");
}
public static string getDate(string startdatetime)
{
long microSec = Convert.ToInt64(startdatetime);
DateTime converted = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc).AddTicks(Convert.ToInt64(microSec) * 10000);
return getCurrentDateTime(converted);
}
}
// App.strDateTime=TimeUtility.getCurrentDateTime(DateTime.Now);
No comments:
Post a Comment