PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Overview
  • Reminder
  • Default display masks
  • The custom masks
  • The preset masks
  • Some examples
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Overview

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 by programming.
  • the display masks that define the characters that can be:
    • Versions 17 and later
      WINDEVWINDEV Mobile displayed in the window controls.
      New in version 17
      WINDEVWINDEV Mobile displayed in the window controls.
      WINDEVWINDEV Mobile displayed in the window controls.
    • printed in the report controls.
Default display masks
By default, when creating a Duration control:
  • the "Duration defined by the project" input mask is selected: the information defined in the parameters for managing the durations for the project is automatically taken into account. Reminder: These parameters are defined for each language in the "Languages" tab of the project description ("Project .. Project description"). Reminder: These parameters are defined for each language in the "Languages" tab of project description:
    1. On the "Project" pane, in the "Project" group, click "Description".
    2. Select the "Languages" tab then the "Duration" tab.
  • Versions 17 and later
    WINDEVWINDEV Mobile the "Same mask as the input" display mask is selected.
    New in version 17
    WINDEVWINDEV Mobile the "Same mask as the input" display mask is selected.
    WINDEVWINDEV Mobile the "Same mask as the input" display mask is selected.
Notes:
  • A list of preset masks is proposed in the description window of the control. You have the ability to:
    • select a preset mask.
    • create a custom mask.
  • Versions 18 and later
    WINDEVWINDEV Mobile To display a relative duration (the number of days passed since a date for example), you also have the ability to use a Date control with a "Relative duration" display mask. See Input and display masks for the Date edit controls for more details.
    New in version 18
    WINDEVWINDEV Mobile To display a relative duration (the number of days passed since a date for example), you also have the ability to use a Date control with a "Relative duration" display mask. See Input and display masks for the Date edit controls for more details.
    WINDEVWINDEV Mobile To display a relative duration (the number of days passed since a date for example), you also have the ability to use a Date control with a "Relative duration" display mask. See Input and display masks for the Date edit controls for more details.
The custom masks
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')
Note: 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).
WEBDEV - Server code The custom input masks are managed in read-only: they are not available when the Web user performs an input in the control.
The preset masks
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'
Note: 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).
Some examples
Examples for using the duration masks:
Examples of durations:
23 days, 4 hours, 43 minutes, 56 seconds, 124 thousandths12 hours, 06 minutes, 24 seconds, 451 thousandths32 minutes, 51 seconds, 347 thousandths
+2D day(s) HH h. MM min. SS sec. CC23 day(s) 04h.12 h. 06 min.32 min. 51 sec.
+2D d H:M:S:CC23 d 4 h12:6 h32:51 m
+1D d HH:MM:SS23 d12 h32 m
+D d HH:MM:SS:CC23 d 04:43:56:12 h12:06:24:45 h32:51:34 m
+D d H h MM m SS s23 d 4 h 43 m 56 s12 h 06 m 24 s32 m 51 s
+5 HH h MM m556 h 43 m12 h 06 m32 m
Minimum required version
  • Version 10
This page is also available for…
Comments
Click [Add] to post a comment