This function returns the current Greenwich
Mean Time, as derived from the regional settings. The function returns values in the TimestampFormat system variable format.
Whenever the app is reloaded, any load script table, variable or chart object that uses the GMT function will be adjusted to the latest current Greenwich Mean Time as derived from the system clock.
Syntax:
GMT( )
Return data type: dual
These examples use the timestamp format M/D/YYYY h:mm:ss[.fff] TT. The date format is specified in the SET TimestampFormat statement at the top of your data load script. Change the format in the examples to suit your requirements.
Function examples
Example
Result
GMT()
3/28/2022 2:47:36 PM
Regional settings
Unless otherwise specified, the examples in this topic use the following date format: MM/DD/YYYY. The date format is specified in the SET DateFormat statement in your data load script. The default date formatting may be different in your system, due to your regional settings and other factors. You can change the formats in the examples below to suit your requirements. Or you can change the formats in your load script to match these examples. For more information, see Modifying regional settings for apps and scripts.
Default regional settings in apps are based on the user profile. These regional format settings are not related to the language displayed in the Qlik Cloud user interface. Qlik Cloud will be displayed in the same language as the browser you are using.
Open the Data load editor and add the load script below to a new tab. This example will set the current Greenwich Mean Time as a variable in the load script using the GMT function.
Load script
LET vGMT = GMT();
Results
Load the data and create a sheet. Create a text box using the Text & image chart object.
Load the data and open a sheet. Create a new table and add these fields as dimensions:
due_date
book_id
days_overdue
Results table
due_date
book_id
days_overdue
01/01/2021
4
455
01/10/2021
24
446
01/31/2021
173
425
02/01/2021
281
424
02/10/2021
265
415
06/30/2021
465
275
07/26/2021
537
249
10/31/2021
275
152
11/01/2021
455
151
12/31/2021
46
91
The values in the days_overdue field are calculated by finding the difference between the current Greenwich Mean Time, using the GMT() function, and the original due date. In order to calculate only the days, the results are rounded off to the nearest whole number using the Floor() function.
Example 3 - chart object (chart)
Overview
Open the Data load editor, and add the load script below to a new tab. The load script contains the same dataset as the previous example. The default DateFormat system variable MM/DD/YYYY is used.
However, in this example, the unchanged dataset is loaded into the application. The value of the number of days overdue is calculated via a measure in a chart object.
Load the data and open a sheet. Create a new table and add these fields as dimensions:
due_date
book_id
Create the following measure:
=Floor(GMT() – due_date)
Results table
due_date
book_id
=Floor(GMT()-due_date)
01/01/2021
4
455
01/10/2021
24
446
01/31/2021
173
425
02/01/2021
281
424
02/10/2021
265
415
06/30/2021
465
275
07/26/2021
537
249
10/31/2021
275
152
11/01/2021
455
151
12/31/2021
46
91
The values in the days_overdue field are calculated by finding the difference between the current Greenwich Mean Time, using the GMT() function, and the original due date. In order to calculate only the days, the results are rounded off to the nearest whole number using the Floor() function.
App
This term has several definitions:
A Qlik Sense or QlikView app: Apps are task-specific, purpose-built applications. Apps contain data loaded from data sources that is interpreted through visualizations.
The Qlik Sense Mobile app: A mobile app for iOS and Android devices. In the mobile app, you connect to and interact with your cloud data. You can work with your available apps.
The load script is a sequence of statements that defines what data to load and how to link the different loaded tables. It can be generated with the Data manager, or with the Data load editor, where it also can be viewed and edited.
Charts are objects where calculations, aggregations, and groupings can be made. Graphical visualizations, such as bar charts and pie charts are common examples, but also non-graphical objects such as pivot tables are charts.
A chart consists of dimensions and measures, where the measures are calculated once per dimensional value. If the chart contains multiple dimensions, the measures are calculated once per combination of dimensional values.
Sheets are components of Qlik Sense apps. They present visualizations to app users so they can explore, analyze, and discover data. Sheets can be public or private.
A measure is a calculation base on one ore more aggregations. For example, the sum of sales is a single aggregation, while the sum of sales divided by the count of customers is a measure based on two aggregations.
The term dataset is sometimes synonymous with table. It can refer to the original source table, the table after undergoing transformations, or the fact and dimension tables in a data mart.
It can also refer to a logical table, where there are several instance tables and views:
Current data
History, which holds previous versions of the table
A field contains values, loaded from a data source. At a basic level, a field corresponds to a column in a table. Fields are used to create dimensions and measures in visualizations.
When you visit any website, it may store or retrieve information on your browser, mostly in the form of cookies. The information does not usually directly identify you, but it makes the site work as you expect it to and can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies by clicking on the different category headings to find out more and change your settings. However, blocking some types of cookies may impact your experience of the site and the services we are able to offer.
Privacy & Cookie Notice
Manage Consent Preferences
Strictly Necessary Cookies
Always Active
These cookies are necessary for the website to function and cannot be switched off in our systems. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms. You can set your browser to block or alert you about these cookies, but some parts of the site will not then work.
Functional Cookies
These cookies enable the website to provide enhanced functionality and personalization. They may be set by us or by third party providers whose services we have added to our pages. If you do not allow these cookies, then some or all of these services may not function properly. These cookies do not typically store personal information enabling us to identify you, but are based on uniquely identifying your browser and internet device.
Performance Cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site and make it easier to navigate. For example, they help us to know which pages are the most and least popular and see how visitors move around the site. When analyzing this data it is typically done on an aggregated (anonymous) basis.
Advertising Cookies
These cookies may be set through our site by our advertising partners to build a profile of your interests and show you relevant advertisements on other sites. They do not typically store personal information enabling us to identify you, but are based on uniquely identifying your browser and internet device. If you do not allow these cookies, you will experience less relevant advertising.