예제 #1
0
        public static DateDTO GetDatePart(string sDate)
        {
            string[] ss    = sDate.Split('/');
            string   day   = "";
            string   month = "";
            string   year  = "";

            if (ss.Length == 3)
            {
                year  = ss[2];
                month = ss[1];
                day   = ss[0];
            }
            else if (ss.Length == 2)
            {
                year  = ss[1];
                month = ss[0];
            }
            else if (ss.Length == 1)
            {
                year = ss[0];
            }
            DateDTO dateDTO = new DateDTO();

            dateDTO.Day   = day;
            dateDTO.Month = month;
            dateDTO.Year  = year;
            return(dateDTO);
        }
예제 #2
0
        public static string GetIntOfDateTo(string sDate)
        {
            DateDTO date = GetDatePart(sDate);

            return(GetIntOfDateTo(date.Day, date.Month, date.Year));
        }