Hello,
I am pretty new to C# and have been surfing this forum. It has been a
great help. I am hoping that you can help with this issue:
I have the following:
TimeSpan Diff = new TimeSpan();
Diff = m_EndTime.Subtract(m_StartTime);
//make array to store all the dates to print
for(int j = Diff.Days;j>0;j--)
{
//change to read array in a loop and make each file
FileName = FileDirectory + "\\" + this.m_StartTime.ToString("yyyyMMdd")
+ j + FileIndx.ToString() + ".txt";
}
Basically, I would need to incriment the m_StartTime j times. Then I
need to store them in an array and run through the dates there to create
a filename for each one. Unless there is a better way. The end result
should just be like this:
m_StartDate = 20060303
m_EndDate = 20060306
j = 4
int [] DateArray contains:
[20060303,20060304,20060305,20060306]
and filenames created are:
20060303.txt
20060304.txt
20060305.txt
20060306.txt
If you could help with this, I would greatly appreciate it.
DH
*** Sent via Developersdex http://www.developersdex.com ***