AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / Desarrollar una aplicación o un sitio web / Controles, ventanas y páginas / Máscaras de entrada y de visualización
  • Overview
  • Reminder
  • Default display masks
  • The custom masks
  • The preset masks
  • For example
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
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 programmatically.
  • the display masks that define the characters that can be:
    • WINDEV 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 project" input mask is selected: the information defined in the duration management parameters for the project is automatically taken into account. Reminder: These parameters are defined for each language in the "Languages" tab of the project description:
    1. On the "Proyecto" tab, in the "Proyecto" group, click "Descripción".
    2. Select the "Languages" tab then the "Duration" tab.
  • WINDEV Mobile the "Same mask as the input" display mask is selected.
Remarks:
  • A list of preset masks is proposed in the description window of the control. You can:
    • select a preset mask.
    • create a custom mask.
  • WINDEV 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. For more details, see Input and display masks for the Date edit controls.
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 (in our example, only the number of hours will be shown).
  • +2: only the two most significant units will be displayed (in our example, only the number of hours and the number of minutes).
    Specify '+3' or '+4' to display the three or four most significant units.
  • J: the number of days will be displayed if this number is greater than 0 (in our example, the number of days will not be displayed).
  • H: the number of hours will be displayed if this number or 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 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 a longer duration (number of days or 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 a longer duration (number of days or 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 a longer number (days, hours or 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 a longer number (days, hours or 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 (letter 'h' for hour, 'm' for minute, 's' for second, 'cs' for hundredth of second and 'ms' for thousandth of second)..
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 (letter 'h' for hour, 'm' for minute, 's' for second, 'cs' for hundredth of second and 'ms' for thousandth of second).
For example
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
Versión mínima requerida
  • Versión 10
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 21/09/2024

Señalar un error o enviar una sugerencia | Ayuda local