|
Iniciado por Patrick, 15,ene. 2004 13:55 - 1 respuesta |
| |
| | | |
|
| |
Publicado el 15,enero 2004 - 13:55 |
[WD5.5] Hello all, I have the following problem. A program is registering the hours that someone has worked. I want to calculate all the hours from a month and display it in a chart.The problem is that the time function is limited to 24 hours. Does anyone know how i can calculate hours and show it in a format like HHH:MM? Greetings Patrick |
| |
| |
| | | |
|
| | |
| |
Publicado el 16,enero 2004 - 09:29 |
For details, browse wdlang.chm and search DateTime, then a list of functions will be provided with good examples. For short, see below: Example: // Time passed since the 01/01/1998 at 12:15 Diff is string Diff = DateTimeDifference("199801011215", DateSys()+TimeSys())
// Display time passed Info("Time passed : " + Left(Diff, + "days"... + Middle(Diff, 9, 2) + "hours"... + Middle(Diff, 11, 2) + "minutes"... + Middle(Diff, 13, 2) + "seconds"... + Middle(Diff, 15, 2) + "hundredth of seconds")
Result> = DateTimeDifference(<Start date/time>, <End date/time>)
Parameters detail
<Result>: Character string
Numbers of days, hours, minutes, seconds passed between the two dates, in the format +/-DDDDDDHHMMSSCC where:
DDDDDD is the number of days passed between the two "Date - Time" specified,
HH is the number of hours,
MM is the number of minutes,
SS is the number of seconds,
CC is the number of hundredth of second.
This result comes from the following operation: <End date/time> - <Start date/time>. The result is negative if the <Start date/time> is later than the <End date/time>.
Caution: to assign this result to a Duration type variable, you must use the StringToDuration function.
<Start date/time>: Character string or DateTime type variable
Start date/time in the format:
YYYYMMDDHHMMSSCC
YYYYMMDDHHMMSS
YYYYMMDDHHMM
YYYYMMDDHH
<End date/time>: Character string or DateTime type variable
End date/time in the format:
YYYYMMDDHHMMSSCC
YYYYMMDDHHMMSS
YYYYMMDDHHMM
YYYYMMDDHH
Enjoy... King
Patrick <patrick.vandebroek@village.uunet.be> wrote:
[WD5.5] Hello all, I have the following problem. A program is registering the hours that someone
has worked. >I want to calculate all the hours from a month and display it in a chart.The problem
is that the time function is limited to 24 hours. Does anyone know how i can calculate hours and show it in a format like HHH:MM?
Greetings Patrick
|
| |
| |
| | | |
|
| | | | |
| | |
|