



 Overview
 Reminder
 Default display masks
 The custom masks
 The preset masks
 For example
The Duration control: Input or display masks
Reminder WINDEV, WEBDEV and WINDEV Mobile propose two types of masks:  the input masks that define the characters that can be typed in the controls found in a window or in a page. Sometimes, these masks can also be used to modify the case (uppercase/lowercase characters) of the values assigned to the window controls or to the page controls through programming.
 the display masks that define the characters that can be:
 displayed in the window controls.
 printed in the report controls.
The following elements can be used to define a custom mask (case sensitive). To present the custom masks, let's take a duration equal to 0 day 04 hours 15 minutes 03 seconds and 412 thousandths of a second:  +1: only the most significant unit will be displayed (the number of hours in our example)
 +2: only the two most significant units will be displayed (the number of hours and the number of minutes in our example)
Specify '+3' or '+4' to display the three or four most significant units.  D: the number of days will be displayed if this number is greater than 0 (the number of days will not be displayed in our example)
 H: the number of hours will be displayed if this number (or if the number of days) is greater than 0. If this number contains a single digit, this digit will be displayed (the number of hours will be '4' in our example)
 HH: the number of hours will be displayed if this number (or if the number of days) is greater than 0. If this number contains a single digit, this digit will be preceded by '0' (the number of hours will be '04' in our example)
 M: the number of minutes will be displayed if this number (or the number of days, or the number of hours) is greater than 0. If this number contains a single digit, this digit will be displayed (the number of minutes will be '15' in our example)
 MM: the number of minutes will be displayed if this number (or the number of days, or the number of hours) is greater than 0. If this number contains a single digit, this digit will be preceded by '0' (the number of minutes will be '15' in our example)
 S: the number of seconds will be displayed if this number (or if the number of days, or the number of hours, or the number of minutes) is greater than 0. If this number contains a single digit, this digit will be displayed (the number of seconds will be '3' in our example)
 SS: the number of seconds will be displayed if this number (or if the number of days, or the number of hours, or the number of minutes) is greater than 0. If this number contains a single digit, this digit will be preceded by '0' (the number of seconds will be '03' in our example)
 CC: the number of hundredths of a second will be displayed (in our example, the number of hundredths of a second will be '41')
 CCC: the number of thousandths of a second will be displayed (in our example, the number of thousandths of a second will be '412')
Remark: If the separator corresponds to the ":" character, the letter corresponding to the most significant unit will be added ('h' for hour, 'm' for minute, 's' for second, 'cs' for hundredths of a second and 'ms' for thousands of a second).
The following masks are proposed (in the order in which they appear in the window editor, page editor or report editor):  '+2D d HH:MM:SS:CC'
 '+2D d H:M:S:CC'
 '+2D d HH:MM:SS:CCC'
 '+2D d HH:MM:SS'
 '+2D d H:M:S'
 '+2D d H h MM m SS s CCC ms'
 '+2D d H h M m S s CCC ms'
 '+2D d H h MM m SS s'
 '+2D d H h M m S s'
 '+1D d HH:MM:SS:CC'
 '+1D d H:M:S:CC'
 '+1D d HH:MM:SS:CCC'
 '+1D d HH:MM:SS'
 '+1D d H:M:S'
 '+1D d H h MM m SS s CCC ms'
 '+1D d H h M m S s CCC ms'
 '+1D d H h MM m SS s'
 '+1D d H h M m S s'
 '+D d HH:MM:SS:CC'
 '+D d H:M:S:CC'
 '+D d HH:MM:SS:CCC'
 '+D d HH:MM:SS'
 '+D d H:M:S'
 '+D d H h MM m SS s CCC ms'
 '+D d H h M m S s CCC ms'
 '+D d H h MM m SS s'
 '+D d H h M m S s'
 '+2D day(s) HH h. MM min. SS sec. CC'
 '+2D day(s) HH h. MM min. SS sec. CCC'
Remark: If the separator corresponds to the ":" character, the letter corresponding to the most significant unit will be added ('h' for hour, 'm' for minute, 's' for second, 'cs' for hundredths of a second and 'ms' for thousands of a second). Examples for using the duration masks:      Examples of durations: 

23 days, 4 hours, 43 minutes, 56 seconds, 124 thousandths  12 hours, 06 minutes, 24 seconds, 451 thousandths  32 minutes, 51 seconds, 347 thousandths     +2D day(s) HH h. MM min. SS sec. CC  23 day(s) 04h.  12 h. 06 min.  32 min. 51 sec.  +2D d H:M:S:CC  23 d 4 h  12:6 h  32:51 m  +1D d HH:MM:SS  23 d  12 h  32 m  +D d HH:MM:SS:CC  23 d 04:43:56:12 h  12:06:24:45 h  32:51:34 m  +D d H h MM m SS s  23 d 4 h 43 m 56 s  12 h 06 m 24 s  32 m 51 s  +5 HH h MM m  556 h 43 m  12 h 06 m  32 m 
This page is also available forâ€¦



















