学习转换成数字相加的思想
public static int ToDateInt(string dateStr)
{
if (string.IsNullOrEmpty(dateStr))
{
return 0;
}
string[] dateString = dateStr.Split(' ');
string Date = dateString[0];
char[] split = new char[2];
split[0] = '/';
split[1] = '-';
string[] array = null;
array = Date.Split(split);
return System.Int32.Parse(array[0]) * 10000 + System.Int32.Parse(array[1]) * 100 + System.Int32.Parse(array[2]);
}