I have stringarray called Timesplit with time like(17:00-2:00).How to store Timeplit array values into datetime array value.I am having 7 values that's why i am using TimeIn[arrayIndex].I will increment arrayIndex for 7 times for 7 timeIn.
I am getting error while trying to store TimesPlit[0] to TimeIn[arrayIndex].I want 17:00 into TimeIn[arrayIndex] and 2:00 into TimeOut[arrayIndex].If i use datetime will get date also so please give me better options to store TimeIn and TimeOut.
Object reference error
Expand|Select|Wrap|Line Numbers
- DateTime[] TimeOut = null;
- TimeIn[arrayIndex]=Convert.ToDateTime(TimeSplit[0]);
- TimeOut[arrayIndex] = TimeSplit[1];