cHoraInicialStart time hh:mm:ss.
AdvPL GuideElapTime( cHoraInicial, cHoraFinal ) --> cRetCalculates a text interval between two times.
ElapTime accepts eight-byte hh:mm:ss strings and returns the same format. Different lengths can raise a fatal error. When start exceeds end, the page describes adding 24 hours; this neither identifies dates nor resolves multiple days. The community example uses Sleep and Time, while this adaptation uses fixed values without waiting or reading the clock. (TOTVS, n.d., ref. 1)
ElapTime( cHoraInicial, cHoraFinal ) --> cRetcHoraInicialStart time hh:mm:ss.
cHoraFinalEnd time hh:mm:ss.
Text hh:mm:ss interval.
#Include "Protheus.ch"
User Function Ed360()
// Two fixed valid time strings.
ConOut(ElapTime("10:00:00", "10:01:30"))
Return NilExpected result: 00:01:30. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.
© 2026 Usina.BR. All rights reserved. TOTVS, Protheus, Microsiga and their respective logos are trademarks of their owners. AdvPL Guide is independent and uses limited, attributed excerpts justified by educational purposes. See the Terms of Use. Terms of Use
Comments
There are no approved comments yet.
Sign in with Google or Microsoft to comment.