Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Time() subtract
Message
 
To
17/08/2004 09:00:48
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00933602
Message ID:
00934385
Views:
31
Does the code works already? Sorry I didn't manage to answer your message, quite busy last week and only have time to browse the internet this day..

If still doesn't work or need a simplified code of the one below, if you dont mind, send to me the form and email to my email add.. jojo@dalplus.com and i'll try to fix/simplify the code and send back to you.

Thanks.


>>hi,

this is the code it works excellent to compute the deffernt times,

just when you make a compare between same two times ex...,i start from 4am, i finished
at 4am next day, i need to see at mytextbox result as 24:00,

any help,any change to this code.


set hour to 24
STORE TTOC(CTOT(thisform.text2.value)- CTOT(thisform.text1.value)+{^2000/01/01:},2) to tResult&&Thisform.text3.value
Thisform.text3.value = SUBSTR(tResult,1,5)
Z = Thisform.text3.value
STORE SUBSTR(z,1,2) TO thour
STORE SUBSTR(z,4,2) TO tMinute
nTime= tHour+"."+tMinute
VAL(nTime)

Thisform.text3.value = VAL(nTIME)

thisform.text6.value=thisform.text5.value*VAL(nTIME)

thisform.text11.value=thisform.text13.value*(CTOT(thisform.text10.value)-CTOT('0:'))/3600

if thisform.text10.value>space(10) .and. thisform.text1.value>space(10) .and. thisform.text2.value>space(10)
=messagebox("YOU ENTER RONG VALUE")
thisform.grid1.visible=.f.

else
thisform.grid1.visible=.t.

select 1
*use table4
APPEN BLANK
REPLACE dat WITH THISFORM.TEXT7.VALUE
REPLACE timEON WITH THISFORM.TEXT1.VALUE
REPLACE timEOF WITH THISFORM.TEXT2.VALUE
REPLACE REGULARHOU WITH tResult
REPLACE TOTAL WITH THISFORM.TEXT6.VALUE
REPLACE OVERTIME WITH THISFORM.TEXT10.VALUE
REPLACE TOTAL1 WITH (THISFORM.TEXT11.VALUE)
*REPLACE REMARK WITH THISFORM.TEXT6.VALUE

***************************************



*THISFORM.GRID1.REFRESH
THISFORM.TEXT1.SETFOCUS
thisform.Refresh

thisform.text7.value= thisform.text7.value+1
thisform.text8.value= (thisform.text8.value)+ val(SUBSTR(tResult,1,5))
thisform.text9.value= (thisform.text8.value)* thisform.text5.value

endif
thanks,
regards.
Jojo R. dela Cuesta, B.Sc.
eConsultant, Programmer
Dalplus Technologies
http://www.dalplus.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform