First you have to define a data type that can hold two string:
type
TPeriod = record
DateStart : String; // Isn't TDateTime better than String here ?
DateEnd : String;
end;
Then you can declare a dynamic array if that data type
var
StoringData : TArray<TPeriod>;
At some point, you must allocate space for the array (This is a dynamic array so no space allocated when it is declared)
SetLength(StoringData, TheSizeYouNeed);
The you can access the array elements like this:
StoringData[0].DateStart := '04/05/2021';
StoringData[0].DateEnd := '06/05/2021';
StoringData[1].DateStart := '04/06/2021';
StoringData[1].DateEnd := '06/06/2021';
You don't need to free the allocated space, it will be done automatically, but you can if you need to reclaim memory. Call SetLength with a zero size.
You can resize the array. Existing data will be kept (If you size down, some will of course be lost):
SetLength(StoringData, 3); // Add a third more row
// Assign a value
StoringData[2].DateStart := '04/07/2021';
StoringData[2].DateEnd := '06/07/2021';
type TPeriod = record StartDate, EndDate: TDate; endandvar Data: array[0..1] of TPeriodif you want a static array andvar Data: TArray<TPeriod>if you want a dynamic array. Remember that dynamic arrays are reference types. Or, use aTList<TPeriod>if you want a simpler API to work against and can live with having to create and free the list heap object.