using System.Collections.Generic;
public static void Main()
List<string> tv=new List<string>();
tv.Add("2021-07-12 07:23:32.770");
tv.Add("2021-07-12 07:22:30.060");
tv.Add("2021-07-12 07:25:32.790");
tv.Add("2021-07-12 07:23:30.040");
tv.Add("2021-07-12 07:24:32.810");
tv.Add("2021-07-12 07:21:30.080");
tv.Add("2021-07-12 07:25:32.820");
tv.Add("2021-07-12 07:23:30.010");
tv.Add("2021-07-12 07:24:32.840");
tv.Add("2021-07-12 07:21:29.990");
tv.Add("2021-07-12 07:24:32.750");
tv.Add("2021-07-12 07:23:29.980");
tv.Add("2021-07-12 07:24:32.870");
string FormatDateTime = "yyyy-MM-dd HH:mm:ss.fff";
List<DateTime> thanhvien1=new List<DateTime>();
for (int i = 0; i < tv.Count; i++)
DateTime myDate = DateTime.ParseExact(tv[i],FormatDateTime,
System.Globalization.CultureInfo.InvariantCulture);
List<long> thanhvien= new List<long>();
for (int i = 0; i < tv.Count; i++)
DateTime myDate = DateTime.ParseExact(tv[i],FormatDateTime,
System.Globalization.CultureInfo.InvariantCulture);
thanhvien.Add(myDate.Ticks);
long max = thanhvien.Max();
long maxIndex = thanhvien.ToList().IndexOf(max);
long min = thanhvien.Min();
long minIndex = thanhvien.ToList().IndexOf(min);
Console.WriteLine(min + " e " + max);
for (int i = 0; i < thanhvien.Count; i ++){
tong = tong + thanhvien[i];
for (int i = 0; i < thanhvien.Count; i++){
double num=thanhvien.Count-3;
long k = (tong-thanhvien[i]-max-min)/10;
DateTime myDate = new DateTime(k);
String test = myDate.ToString("yyyy-MM-dd HH:mm:ss.fff");