Early Access: The content on this website is provided for informational purposes only in connection with pre-General Availability Qlik Products.
All content is subject to change and is provided without warranty.
Skip to main content Skip to complementary content

maketime - script and chart function

This function returns a time calculated from the hour hh, the minute mm, and the second ss.

Syntax:  

MakeTime(hh [ , mm [ , ss ] ])

Return data type: dual

Arguments
Argument Description
hh The hour as an integer.
mm

The minute as an integer.

If no minute is stated, 00 is assumed.

ss

The second as an integer.

If no second is stated, 00 is assumed.

When to use it

The maketime() function would commonly be used in the script for data generation to generate a time field. Sometimes, when the time field is derived from input text, this function could be used to construct the time using its components.

These examples use the time format h:mm:ss. The time format is specified in the SET TimeFormatstatement at the top of your data load script Change the format in the examples to suit your requirements.

Function examples
Example Result
maketime(22) Returns 22:00:00.
maketime(22, 17) Returns 22:17:00.
maketime(22,17,52 ) Returns 22:17:52.

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.

If you are an app creator, you can set the default region for apps you create. For more information, see Setting your preferred regional settings for creating apps and scripts in Qlik Cloud Analytics.

Example 1 – maketime()

Example 2 – time() function

Example 3 – Chart object example

Example 4 – Scenario

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!