Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- The Library for Clipper - <b>l_addhours()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
                                 L_ADDHOURS()


Syntax:        L_ADDHOURS(<expN1>, <expC> [,expN2>])


Purpose:       To add a number of hours to a character time string.


Arguments:     <expN1> is the number of hours to add to the character
               time string).

               <expC> is the character time string to which the hours
               is to be added and must be in a suitable format.

               <expN2> is optional and governs the zone width of the
               number of characters in which the hours will be returned.

               <expN2> should be greater than 1



Returns:       A character time string in the format of HH:MM:SS if no
               <expN2> is specified.

               CHR(0) is returned if Syntax Error or an incorrect number of
               parameters is passed.


Usage:         Leading zeros will be added to the hours field if the
               specified width is longer than the characters of the
               actual hours.

               Default zone width = 2


Examples:      * Add these hours
               hours_then = "12:10:20"
               hours = 23
               ? L_ADDHOURS(hours,hours_then)      && Result: 35:10:20

               * change format of hours
               ? L_ADDHOURS(hours,hours_then,4)    && Result: 0035:10:20

               ? L_ADDHOURS(148,"48:10:23")        && Result: 196:10:23

               ? L_ADDHOURS(148,"48:10:23")        && Result: "**:10:23"


Language:      Clipper

See Also: L_ADDTIMES() L_ADDSECS() L_ADDMINS()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson