123456789101112131415161718192021222324252627 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace SinochemInternetPlusApp
- {
- public static class Utilities
- {
- public static DateTime CombineDateAndTime(DateTime date, string time)
- {
- var dateTime = DateTime.Parse(date.Date.ToShortDateString() + " " + time);
- return dateTime;
- }
- public static string ConvertDateTimeToReadble(DateTime dt)
- {
- return dt.ToString("yyyy-MM-dd hh:mm:ss tt");
- }
- public static string ConvertDateTimeToPrintFormat(DateTime dt)
- {
- return dt.ToString("yyyy/MM/dd HH:mm:ss");
- }
- }
- }
|