Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Cetin Basoz
  Where is Cetin Basoz?
 Izmir
 Turkey
 Cetin Basoz
 To: Shaheryar Rashed
  Where is Shaheryar Rashed?
 Multan
 Pakistan
 Shaheryar Rashed
 Tags
Subject: RE: time totals
Thread ID: 395497 Message ID: 395525 # Views: 75 # Ratings: 5
Version: Visual FoxPro 9 SP2 Category: Forms
Date: Wednesday, January 15, 2014 5:51:36 PM         
   


> Hi experts!
>
> below is data:
>
>
Create Cursor test ( ariv c(10), dis c(10) )
> Insert into test values ('08:00a', '08:30p')
> Insert into test values ('08:00a', '09:40p')
> Insert into test values ('08:00a', '10:45p')
> 
> Browse fields ariv, dis, labour = Transform( Right( Ttoc( Ctot(dis) - ( Ctot(ariv) - Ctot('0')), 1 ), 6), '@R 99:99' )
> LOCAL lcVal
> SUM val(Transform( Right( Ttoc( Ctot(dis) - ( Ctot(ariv) - Ctot('0')), 1 ), 6), '@R 99:99' ) ) TO lcVal
> WAIT WINDOW lcVal
> 

>
> now i have to total the time... guide me please

I thought I gave you the solution last week:
Create Cursor test ( ariv c(10), dis c(10) )

Insert Into test Values ('08:00a', '08:30p')
Insert Into test Values ('08:00a', '09:40p')
Insert Into test Values ('08:00a', '10:45p')

Select Sum( Ctot(dis) - ( Ctot(ariv) - Ctot('0') ) - Ctot('0') ) from test into array laTotalTime

Local hrs, mins
hrs = Int(laTotalTime[1]/(60*60))
mins = Int(laTotalTime[1]%(60*60)/60)

? Textmerge('<< m.hrs >>:<< Padl(m.mins,2,"0") >>')




Cetin Basoz

Give some sample data in code for your question - here is the tool you need to generate the code

My Blog


MongoDb Certified Developer
MongoDb Certified DBA


Support Wikipedia

ENTIRE THREAD

time totals Posted by Shaheryar Rashed @ 1/15/2014 1:58:56 PM
RE: time totals Posted by David Mustakim @ 1/15/2014 2:18:45 PM
RE: time totals Posted by Shaheryar Rashed @ 1/15/2014 2:30:23 PM
RE: time totals Posted by David Mustakim @ 1/15/2014 2:47:42 PM
RE: time totals Posted by Shaheryar Rashed @ 1/15/2014 3:13:41 PM
RE: time totals Posted by Tore Bleken @ 1/15/2014 3:22:29 PM
RE: time totals Posted by Shaheryar Rashed @ 1/16/2014 7:36:37 AM
RE: time totals Posted by Anders Altberg @ 1/15/2014 4:51:39 PM
RE: time totals Posted by Cetin Basoz @ 1/15/2014 5:51:36 PM
RE: time totals Posted by Shaheryar Rashed @ 1/17/2014 6:51:16 AM
RE: time totals Posted by Cetin Basoz @ 1/17/2014 1:24:20 PM
RE: time totals Posted by Shaheryar Rashed @ 1/18/2014 6:45:09 AM
RE: time totals Posted by Anders Altberg @ 1/18/2014 11:50:19 PM