Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Time Calculation
Message
From
11/02/2010 11:05:03
 
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01448762
Message ID:
01448798
Views:
48
Text1 has this value

11:25-13:30

I want to get tolal elaspsed time as

02:05

The I want to multiply 02:05 with 5 as

10:25
lcStartTime GETWORDNUM( ALLTRIM( Thisform.text1.Value ), 1, '-')
lcEndTime GETWORDNUM( ALLTRIM( Thisform.text1.Value ), 2, '-')
lnEndHours = INT(VAL(GETWORDNUM(lcEndTime, 1, ':')))
lnStartHours = INT(VAL(GETWORDNUM(lcStartTime, 1, ':')))
lnEndMins = INT(VAL(GETWORDNUM(lcEndTime, 2, ':')))
lnStartMins = INT(VAL(GETWORDNUM(lcStartTime, 2, ':')))
lcDiff = PADL( lnEndHours - lnStartHours, 2, '0' ) + ':' + PADL( lnEndMins - lnStartMins, 2, '0' )
?lcDiff
Multiplying the result by 5 is left as a learning exercise for you <s>
Previous
Reply
Map
View

Click here to load this message in the networking platform