Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Adding Multi Date
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 app
ended
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

Report this thread to moderator Post Follow-up to this message
Old Post
Benny Yap Kok Meng
05-21-05 01:55 AM


Re: Adding Multi Date
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



Report this thread to moderator Post Follow-up to this message
Old Post
Stephen Quinn
05-22-05 08:55 AM


Re: Adding Multi Date
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



Report this thread to moderator Post Follow-up to this message
Old Post
Stephen Quinn
05-24-05 08:55 PM


Re: Adding Multi Date
Steve

Thanks for the inputs.

"Stephen Quinn" <steveqNOSPAM@integritynet.com.au> wrote in message news:<d6p0f1$ag3$1@domi
tilla.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

Report this thread to moderator Post Follow-up to this message
Old Post
Benny Yap Kok Meng
05-25-05 08:55 AM


Re: Adding Multi Date
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



Report this thread to moderator Post Follow-up to this message
Old Post
Stephen Quinn
05-29-05 01:55 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Clipper archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 06:29 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.