Aller au contenu principal
CloudStudio

Sélection de périodes de temps

Introduction

The platform allows time period selection in various situations, such as:

  • Dashboards
  • Widgets
  • Historical data visualization
  • Reports

In all cases, the user interface presents a component like the following:

Menu déroulant pour sélectionner des périodes de temps avec des plages prédéfinies et personnalisées

Choosing absolute and relative time periods

This component allows selecting a date range (including time, if applicable), both in absolute and relative form. Below is how this feature is used.

Absolute time periods

To specify an absolute time period, use the buttons to enter dates. You can choose a start date and time, as well as an end date and time.

Menu déroulant de sélection de temps avec les boutons de calendrier mis en évidence

When pressing the "Apply" button, the selector will display the selected period:

Sélecteur affichant une période de dates et heures absolues appliquée

Relative time periods

To choose relative time periods, you can use the options bar on the right, as shown here, as well as enter arbitrary relative time expressions. The following image shows the list of predefined relative time options:

Menu de sélection de date affichant la liste des options de temps relatif prédéfinies

However, you can also enter any relative time period by typing it in the respective "From" and "To" fields, as shown in the following example:

Sélecteur de période avec des expressions relatives saisies dans De et À

The syntax for relative expressions is as follows:

  • now always represents the current date and time.
  • Then, you can add or subtract an arbitrary amount of seconds, minutes, hours, days, months, or years.
  • s represents seconds
  • m represents minutes
  • h represents hours
  • d represents days
  • M represents months
  • y represents years
  • Optionally, you can "round" the date to the beginning of the day, month, or year by adding any of the following modifiers:
  • /d represents the beginning of the day
  • /M represents the beginning of the month
  • /y represents the beginning of the year

Examples of relative expressions:

Start expressionEnd expressionMeaning
now/dnowFrom the beginning of today until now.
now/MnowFrom the beginning of the month until now.
now-1d/dnow/dYesterday.
now-6hnowThe last 6 hours.
now-30mnowThe last 30 minutes.
now-14/dnowThe last 15 days (including today).

Mixed time periods

You can also use a combination of fixed and relative periods. For example, to indicate the time period "from January 1, 2021 until now", you can enter the absolute date "January 1, 2021" in the "from" field, and then the relative expression "now" in the "to" field.

Dernière mise à jour le

Sur cette page