public static DateAndTime SplitCsvFileAndReturnDateAndTime(string eachRow)
        {
            var eachRowOfCsvFile = eachRow.Split(',');

            var objOfDateAndTime = new DateAndTime();

            var provider = new CultureInfo("en-GB");

            Thread.CurrentThread.CurrentCulture = provider;
            var dateOnly = ExtractDate(eachRowOfCsvFile[DateColumnNumber], provider);
            var timeOnly = ExtractTime(eachRowOfCsvFile[TimeColumnNumber], provider);

            objOfDateAndTime.Dt = dateOnly.Date.Add(timeOnly.TimeOfDay);

            return(objOfDateAndTime);
        }
Ejemplo n.º 2
0
        public static DateAndTime SplitCsvFileAndReturnDateAndTime(string eachRow)
        {
            string[] eachRowOfCsvFile = eachRow.Split(',');

            DateAndTime objOfDateAndTime = new DateAndTime();

            CultureInfo provider = new CultureInfo("en-GB");

            Thread.CurrentThread.CurrentCulture = provider;
            DateTime DateOnly = ExtractDate(eachRowOfCsvFile[dateColumnNumber], provider);
            DateTime TimeOnly = ExtractTime(eachRowOfCsvFile[timeColumnNumber], provider);

            objOfDateAndTime.dateAndTime = DateOnly.Date.Add(TimeOnly.TimeOfDay);

            return(objOfDateAndTime);
        }