|
|
| Benny Yap Kok Meng 2005-05-20, 8:55 pm |
| I have 2 database to add-in date as structure below with selection by user.
When user key in a input of from date & to date structure below shall be appended
to both database.
Eg: User may input range as 01/01/2005 to 31/12/2005 or 01/01/2005 to 31/08/2009
Any fast method to achieve this?.
Database1 - Stru
FDATE TDATE CUDATE WEEK_DAY
01/05/2005 31/05/2005 01/05/2005 Sunday
01/05/2005 31/05/2005 02/05/2005 Monday
01/05/2005 31/05/2005 03/05/2005 Tuesday
01/05/2005 31/05/2005 04/05/2005 Wednesday
01/05/2005 31/05/2005 05/05/2005 Thursday
01/05/2005 31/05/2005 06/05/2005 Friday
01/05/2005 31/05/2005 07/05/2005 Saturday
01/05/2005 31/05/2005 08/05/2005 Sunday
Database2 - Stru
CUDATE WEEK_DAY FLAG
01/05/2005 Sunday Y
02/05/2005 Monday Y
03/05/2005 Tuesday Y
04/05/2005 Wednesday Y
05/05/2005 Thursday Y
06/05/2005 Friday Y
07/05/2005 Saturday Y
08/05/2005 Sunday Y
Thanks in advance
Regards
Benny
| |
| Stephen Quinn 2005-05-22, 3:55 am |
| Benny
@ 1, 15 GET FromDate PICTURE '@E'
@ 2, 15 GET ToDate PICTURE '@E'
dDate := FromDate - 1
FOR i := 1 TO 8
DB1->( DBAPPEND() )
DB2->( DBAPPEND() )
DB1->FDATE := FromDate
DB1->TDATE := ToDate
dDate += 1
DB1->CUDATE := dDate
DB2->CUDATE := dDate
cDay := DOW( dDate )
DB1->WEEK_DAY := cDay
DB2->WEEK_DAY := cDay
DB2->FLAG := .T. (or 'Y' )
NEXT
HTH
Steve
| |
| Stephen Quinn 2005-05-24, 3:55 pm |
| Benny
@ 1, 15 GET FromDate PICTURE '@E'
@ 2, 15 GET ToDate PICTURE '@E'
dDate := FromDate - 1
FOR i := 1 TO 8
DB1->( DBAPPEND() )
DB2->( DBAPPEND() )
DB1->FDATE := FromDate
DB1->TDATE := ToDate
dDate += 1
DB1->CUDATE := dDate
DB2->CUDATE := dDate
cDay := DOW( dDate )
DB1->WEEK_DAY := cDay
DB2->WEEK_DAY := cDay
DB2->FLAG := .T. (or 'Y' )
NEXT
HTH
Steve
| |
| Benny Yap Kok Meng 2005-05-25, 3:55 am |
| Steve
Thanks for the inputs.
"Stephen Quinn" <steveqNOSPAM@integritynet.com.au> wrote in message news:<d6p0f1$ag3$1@domitilla.aioe.org>...
> Benny
>
> @ 1, 15 GET FromDate PICTURE '@E'
> @ 2, 15 GET ToDate PICTURE '@E'
>
> dDate := FromDate - 1
> FOR i := 1 TO 8
> DB1->( DBAPPEND() )
> DB2->( DBAPPEND() )
>
> DB1->FDATE := FromDate
> DB1->TDATE := ToDate
>
> dDate += 1
> DB1->CUDATE := dDate
> DB2->CUDATE := dDate
>
> cDay := DOW( dDate )
> DB1->WEEK_DAY := cDay
> DB2->WEEK_DAY := cDay
>
> DB2->FLAG := .T. (or 'Y' )
> NEXT
>
> HTH
> Steve
| |
| Stephen Quinn 2005-05-28, 8:55 pm |
| Benny
@ 1, 15 GET FromDate PICTURE '@E'
@ 2, 15 GET ToDate PICTURE '@E'
dDate := FromDate - 1
FOR i := 1 TO 8
DB1->( DBAPPEND() )
DB2->( DBAPPEND() )
DB1->FDATE := FromDate
DB1->TDATE := ToDate
dDate += 1
DB1->CUDATE := dDate
DB2->CUDATE := dDate
cDay := DOW( dDate )
DB1->WEEK_DAY := cDay
DB2->WEEK_DAY := cDay
DB2->FLAG := .T. (or 'Y' )
NEXT
HTH
Steve
|
|
|
|