admin
2020-06-22 924bdf1c9fb74babf2438d5545db3594756625d1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
 
namespace WindowsFormsApp1.utils
{
    class TimeUtil
    {
        public static Int64 convertToTimeStamp(DateTime dt) {
            DateTime dateStart = new DateTime(1970, 1, 1, 8, 0, 0);
            return Convert.ToInt64((dt - dateStart).TotalSeconds);
        }
 
        public static String GetGeneralTime(DateTime dt,String format)
        {
         return   dt.ToString(format);
        }
 
 
 
       
 
    }
}