Board index » cppbuilder » DateTimePicker1 calendar list date

DateTimePicker1 calendar list date


2004-08-14 05:19:44 PM
cppbuilder77
I need to get in an array the liste of all week strating from one date.
Example:
AnsiString sDate="01/09/2004";
i need then a way for getting all date after 7 days like this:
08/09/2004, 15/09/2004, and so on...
What is the way using for example DateTimePicker1 or something else ?
Thanks.
Sam
 
 

Re:DateTimePicker1 calendar list date

I need something like IncWeek but I have BCB 5 and there is only IncMonth.
Sam
"Sam" < XXXX@XXXXX.COM >a écrit dans le message de
Quote
I need to get in an array the liste of all week strating from one date.
Example:
AnsiString sDate="01/09/2004";
i need then a way for getting all date after 7 days like this:

08/09/2004, 15/09/2004, and so on...
What is the way using for example DateTimePicker1 or something else ?
Thanks.

Sam


 

Re:DateTimePicker1 calendar list date

Use a TDateTime object,
add 7 to it,
repeat as necessary.
TDateTime dt( TDateTime::CurrentDate() );
const int Weeks = 10;
for( int i=0; i < Weeks; ++i )
{
ListBox3->Items->Add( dt );
dt += 7;
}
Todd
"Sam" < XXXX@XXXXX.COM >wrote in message news:411e3d64$ XXXX@XXXXX.COM ...
Quote
I need something like IncWeek but I have BCB 5 and there is only IncMonth.

Sam
"Sam" < XXXX@XXXXX.COM >a écrit dans le message de
news: XXXX@XXXXX.COM ...
>I need to get in an array the liste of all week strating from one date.
>Example:
>AnsiString sDate="01/09/2004";
>i need then a way for getting all date after 7 days like this:
>
>08/09/2004, 15/09/2004, and so on...
>What is the way using for example DateTimePicker1 or something else ?
 

{smallsort}

Re:DateTimePicker1 calendar list date

Thnak you very much it works fine.
Sam
"Todd Brylski" < XXXX@XXXXX.COM >a écrit dans le message de
Quote
Use a TDateTime object,
add 7 to it,
repeat as necessary.

TDateTime dt( TDateTime::CurrentDate() );
const int Weeks = 10;

for( int i=0; i < Weeks; ++i )
{
ListBox3->Items->Add( dt );
dt += 7;
}

Todd


"Sam" < XXXX@XXXXX.COM >wrote in message
>I need something like IncWeek but I have BCB 5 and there is only
IncMonth.
>
>Sam
>"Sam" < XXXX@XXXXX.COM >a écrit dans le message de
>news: XXXX@XXXXX.COM ...
>>I need to get in an array the liste of all week strating from one
date.
>>Example:
>>AnsiString sDate="01/09/2004";
>>i need then a way for getting all date after 7 days like this:
>>
>>08/09/2004, 15/09/2004, and so on...
>>What is the way using for example DateTimePicker1 or something else
?