# Date and time functions

QlikView date and time functions are used to transform and convert date and time values. All functions can be used in both the load script and in chart expressions.

Functions are based on a date-time serial number that equals the number of days since December 30, 1899. The integer value represents the day and the fractional value represents the time of the day.

QlikView uses the numerical value of the parameter, so a number is valid as a parameter also when it is not formatted as a date or a time. If the parameter does not correspond to numerical value, for example, because it is a string, then QlikView attempts to interpret the string according to the date and time environment variables.

If the time format used in the parameter does not correspond to the one set in the environment variables, QlikView will not be able to make a correct interpretation. To resolve this, either change the settings or use an interpretation function.

In the examples for each function, the default time and date formats hh:mm:ss and YYYY-MM-DD (ISO 8601) are assumed.

Information note

When processing a timestamp with a date or time function, QlikView ignores any daylight savings time parameters unless the date or time function includes a geographical position.

For example, `ConvertToLocalTime( filetime('Time.qvd'), 'Paris')` would use daylight savings time parameters while `ConvertToLocalTime(filetime('Time.qvd'), 'GMT-01:00')` would not use daylight savings time parameters.

Use the drop-down on each function to see a brief description and the syntax of each function. Click the function name in the syntax description for further details.

### Integer expressions of time

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/date-time-functions.htm)

#### second

This function returns an integer representing the second when the fraction of the expression is interpreted as a time according to the standard number interpretation.

[**second**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/second.htm)(expression)

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/date-time-functions.htm)

#### minute

This function returns an integer representing the minute when the fraction of the expression is interpreted as a time according to the standard number interpretation.

[**minute**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/minute.htm)(expression)

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/date-time-functions.htm)

#### hour

This function returns an integer representing the hour when the fraction of the expression is interpreted as a time according to the standard number interpretation.

[**hour**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/hour.htm)(expression)

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/date-time-functions.htm)

#### day

This function returns an integer representing the day when the fraction of the expression is interpreted as a date according to the standard number interpretation.

[**day**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/day.htm)(expression)

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/date-time-functions.htm)

#### week

This function returns an integer representing the week number according to ISO 8601. The week number is calculated from the date interpretation of the expression, according to the standard number interpretation.

[**week**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/week.htm)(timestamp [, first\_week\_day [, broken\_weeks [, reference\_day]]])

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/date-time-functions.htm)

#### month

This function returns a dual value with a month name as defined in the environment variable MonthNames and an integer between 1-12. The month is calculated from the date interpretation of the expression, according to the standard number interpretation.

[**month**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/month.htm)(expression)

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/date-time-functions.htm)

#### year

This function returns an integer representing the year when the expression is interpreted as a date according to the standard number interpretation.

[**year**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/year.htm)(expression)

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/date-time-functions.htm)

#### weekyear

This function returns the year to which the week number belongs according to ISO 8601. The week number ranges between 1 and approximately 52.

[**weekyear**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/weekyear.htm)(expression)

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/date-time-functions.htm)

#### weekday

This function returns a dual value with: A day name as defined in the environment variable DayNames. An integer between 0-6 corresponding to the nominal day of the week (0-6).

[**weekday**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/weekday.htm)(date)

### Timestamp functions

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/date-time-functions.htm)

#### now

This function returns a timestamp of the current time from the system clock. The default value is 1.

[**now**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/now.htm)([ timer\_mode])

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/date-time-functions.htm)

#### today

This function returns the current date from the system clock.

[**today**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/today.htm)([timer\_mode])

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/date-time-functions.htm)

#### LocalTime

This function returns a timestamp of the current time from the system clock for a specified time zone.

[**localtime**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/localtime.htm)([timezone [, ignoreDST ]])

### Make functions

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/date-time-functions.htm)

#### makedate

This function returns a date calculated from the year YYYY, the month MM and the day DD.

[**makedate**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/makedate.htm)(YYYY [ , MM [ , DD ] ])

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/date-time-functions.htm)

#### makeweekdate

This function returns a date calculated from the year YYYY, the week WW and the day-of-week D.

[**makeweekdate**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/makeweekdate.htm)(YYYY [ , WW [ , D ] ])

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/date-time-functions.htm)

#### maketime

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

[**maketime**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/maketime.htm)(hh [ , mm [ , ss [ .fff ] ] ])

### Other date functions

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/date-time-functions.htm)

#### AddMonths

This function returns the date occurring n months after startdate or, if n is negative, the date occurring n months before startdate.

[**addmonths**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/addmonths.htm)(startdate, n , [ , mode])

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/date-time-functions.htm)

#### AddYears

This function returns the date occurring n years after startdate or, if n is negative, the date occurring n years before startdate.

[**addyears**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/addyears.htm)(startdate, n)

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/date-time-functions.htm)

#### yeartodate

This function finds if the input date falls within the year of the date the script was last loaded, and returns True if it does, False if it does not.

[**yeartodate**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/yeartodate.htm)(timestamp [ , yearoffset [ , firstmonth [ , todaydate] ] ])

### Timezone functions

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/date-time-functions.htm)

#### timezone

This function returns the name of the current time zone, as defined in Windows, not taking into account the daylight savings adjustment.

[**timezone**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/timezone.htm)( )

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/date-time-functions.htm)

#### GMT

This function returns the date and current Greenwich Mean Time, as derived from the system clock and Windows time settings.

[**GMT**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/GMT.htm)( )

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/date-time-functions.htm)

#### UTC

Returns the date and current Coordinated Universal Time.

[**UTC**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/UTC.htm)( )

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/date-time-functions.htm)

#### daylightsaving

Returns the current adjustment for daylight saving time, as defined in Windows.

[**daylightsaving**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/daylightsaving.htm)( )

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/date-time-functions.htm)

#### converttolocaltime

Converts a UTC or GMT timestamp to local time as a dual value. The place can be any of a number of cities and time zones around the world.

[**converttolocaltime**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/converttolocaltime.htm)(timestamp [, place [, ignore\_dst=false]])

### Set time functions

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/date-time-functions.htm)

#### setdateyear

This function takes as input a timestamp and a year and updates the timestamp with the year specified in input.

[**setdateyear**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/setdateyear.htm) (timestamp, year)

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/date-time-functions.htm)

#### setdateyearmonth

This function takes as input a timestamp, a month and a year and updates the timestamp with the year and the month specified in input.

[**setdateyearmonth**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/setdateyearmonth.htm) (timestamp, year, month)

### In... functions

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/date-time-functions.htm)

#### inyear

This function returns True if timestamp lies inside the year containing base\_date.

[**inyear**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/inyear.htm)(date, basedate , shift [, first\_month\_of\_year = 1])

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/date-time-functions.htm)

#### inyeartodate

This function returns True if timestamp lies inside the part of year containing base\_date up until and including the last millisecond of base\_date.

[**inyeartodate**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/inyeartodate.htm) (date, basedate , shift [, first\_month\_of\_year = 1])

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/date-time-functions.htm)

#### inquarter

This function returns True if timestamp lies inside the quarter containing base\_date.

[**inquarter**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/inquarter.htm) (date, basedate , shift [, first\_month\_of\_year = 1])

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/date-time-functions.htm)

#### inquartertodate

This function returns True if timestamp lies inside the part of the quarter containing base\_date up until and including the last millisecond of base\_date.

[**inquartertodate**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/inquartertodate.htm) (date, basedate , shift [, first\_month\_of\_year = 1])

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/date-time-functions.htm)

#### inmonth

This function returns True if timestamp lies inside the month containing base\_date.

[**inmonth**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/inmonth.htm)(date, basedate , shift)

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/date-time-functions.htm)

#### inmonthtodate

Returns True if timestamp lies inside the part of month containing base\_date up until and including the last millisecond of base\_date.

[**inmonthtodate**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/inmonthtodate.htm) (date, basedate , shift)

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/date-time-functions.htm)

#### inmonths

This function finds if a timestamp falls within the same month, bi-month, quarter, four-month period, or half-year as a base date. It is also possible to find if the timestamp falls within a previous or following time period.

[**inmonths**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/inmonths.htm)(n, date, basedate , shift [, first\_month\_of\_year = 1])

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/date-time-functions.htm)

#### inmonthstodate

This function finds if a timestamp falls within the part of a period of the month, bi-month, quarter, four-month period, or half-year up to and including the last millisecond of base\_date. It is also possible to find if the timestamp falls within a previous or following time period.

[**inmonthstodate**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/inmonthstodate.htm) (n, date, basedate , shift [, first\_month\_of\_year = 1])

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/date-time-functions.htm)

#### inweek

This function returns True if timestamp lies inside the week containing base\_date.

[**inweek**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/inweek.htm)(date, basedate , shift [, weekstart])

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/date-time-functions.htm)

#### inweektodate

This function returns True if timestamp lies inside the part of week containing base\_date up until and including the last millisecond of base\_date.

[**inweektodate**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/inweektodate.htm) (date, basedate , shift [, weekstart])

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/date-time-functions.htm)

#### inlunarweek

This function returns true if timestamp lies inside the lunar week containing base\_date. Lunar weeks in QlikView are defined by counting 1 January as the first day of the week.

[**inlunarweek**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/inlunarweek.htm) (date, basedate , shift [, weekstart])

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/date-time-functions.htm)

#### inlunarweektodate

This function returns true if timestamp lies inside the part of the lunar week up to and including the last millisecond of base\_date. Lunar weeks in QlikView are defined by counting 1 January as the first day of the week.

[**inlunarweektodate**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/inlunarweektodate.htm) (date, basedate , shift [, weekstart])

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/date-time-functions.htm)

#### inday

This function returns True if timestamp lies inside the day containing base\_timestamp.

[**inday**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/inday.htm)(timestamp, basetimestamp , shift [, daystart])

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/date-time-functions.htm)

#### indaytotime

This function returns True if timestamp lies inside the part of day containing base\_timestamp up until and including the exact millisecond of base\_timestamp.

[**indaytotime**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/indaytotime.htm)(timestamp, basetimestamp , shift [, daystart])

### Start ... end functions

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/date-time-functions.htm)

#### yearstart

This function returns a timestamp corresponding to the start of the first day of the year containing date. The default output format will be the DateFormat set in the script.

[**yearstart**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/yearstart.htm)( date [, shift = 0 [, first\_month\_of\_year = 1]])

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/date-time-functions.htm)

#### yearend

This function returns a value corresponding to a timestamp of the last millisecond of the last day of the year containing date. The default output format will be the DateFormat set in the script.

[**yearend**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/yearend.htm)( date [, shift = 0 [, first\_month\_of\_year = 1]])

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/date-time-functions.htm)

#### yearname

This function returns a four-digit year as display value with an underlying numeric value corresponding to a timestamp of the first millisecond of the first day of the year containing date.

[**yearname**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/yearname.htm)(date [, shift = 0 [, first\_month\_of\_year = 1]] )

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/date-time-functions.htm)

#### quarterstart

This function returns a value corresponding to a timestamp of the first millisecond of the quarter containing date. The default output format will be the DateFormat set in the script.

[**quarterstart**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/quarterstart.htm)(date [, shift = 0 [, first\_month\_of\_year = 1]])

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/date-time-functions.htm)

#### quarterend

This function returns a value corresponding to a timestamp of the last millisecond of the quarter containing date. The default output format will be the DateFormat set in the script.

[**quarterend**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/quarterend.htm)(date [, shift = 0 [, first\_month\_of\_year = 1]])

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/date-time-functions.htm)

#### quartername

This function returns a display value showing the months of the quarter (formatted according to the MonthNames script variable) and year with an underlying numeric value corresponding to a timestamp of the first millisecond of the first day of the quarter.

[**quartername**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/quartername.htm)(date [, shift = 0 [, first\_month\_of\_year = 1]])

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/date-time-functions.htm)

#### monthstart

This function returns a value corresponding to a timestamp of the first millisecond of the first day of the month containing date. The default output format will be the DateFormat set in the script.

[**monthstart**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/monthstart.htm)(date [, shift = 0])

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/date-time-functions.htm)

#### monthend

This function returns a value corresponding to a timestamp of the last millisecond of the last day of the month containing date. The default output format will be the DateFormat set in the script.

[**monthend**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/monthend.htm)(date [, shift = 0])

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/date-time-functions.htm)

#### monthname

This function returns a display value showing the month (formatted according to the MonthNames script variable) and year with an underlying numeric value corresponding to a timestamp of the first millisecond of the first day of the month.

[**monthname**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/monthname.htm)(date [, shift = 0])

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/date-time-functions.htm)

#### monthsstart

This function returns a value corresponding to the timestamp of the first millisecond of the month, bi-month, quarter, four-month period, or half-year containing a base date. It is also possible to find the timestamp for a previous or following time period.

[**monthsstart**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/monthsstart.htm)(n, date [, shift = 0 [, first\_month\_of\_year = 1]])

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/date-time-functions.htm)

#### monthsend

This function returns a value corresponding to a timestamp of the last millisecond of the month, bi-month, quarter, four-month period, or half-year containing a base date. It is also possible to find the timestamp for a previous or following time period.

[**monthsend**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/monthsend.htm)(n, date [, shift = 0 [, first\_month\_of\_year = 1]])

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/date-time-functions.htm)

#### monthsname

This function returns a display value representing the range of the months of the period (formatted according to the MonthNames script variable) as well as the year. The underlying numeric value corresponds to a timestamp of the first millisecond of the month, bi-month, quarter, four-month period, or half-year containing a base date.

[**monthsname**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/monthsname.htm)(n, date [, shift = 0 [, first\_month\_of\_year = 1]])

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/date-time-functions.htm)

#### weekstart

This function returns a value corresponding to a timestamp of the first millisecond of the first day (Monday) of the calendar week containing date. The default output format is the DateFormat set in the script.

[**weekstart**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/weekstart.htm)(date [, shift = 0 [,weekoffset = 0]])

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/date-time-functions.htm)

#### weekend

This function returns a value corresponding to a timestamp of the last millisecond of the last day (Sunday) of the calendar week containing date. The default output format will be the DateFormat set in the script.

[**weekend**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/weekend.htm)(date [, shift = 0 [,weekoffset = 0]])

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/date-time-functions.htm)

#### weekname

This function returns a value showing the year and week number with an underlying numeric value corresponding to a timestamp of the first millisecond of the first day of the week containing date.

[**weekname**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/weekname.htm)(date [, shift = 0 [,weekoffset = 0]])

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/date-time-functions.htm)

#### lunarweekstart

This function returns a value corresponding to a timestamp of the first millisecond of the lunar week containing date. Lunar weeks in QlikView are defined by counting 1 January as the first day of the week.

[**lunarweekstart**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/lunarweekstart.htm)(date [, shift = 0 [,weekoffset = 0]])

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/date-time-functions.htm)

#### lunarweekend

This function returns a value corresponding to a timestamp of the last millisecond of the lunar week containing date. Lunar weeks in QlikView are defined by counting 1 January as the first day of the week.

[**lunarweekend**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/lunarweekend.htm)(date [, shift = 0 [,weekoffset = 0]])

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/date-time-functions.htm)

#### lunarweekname

This function returns a display value showing the year and lunar week number corresponding to a timestamp of the first millisecond of the first day of the lunar week containing date. Lunar weeks in QlikView are defined by counting 1 January as the first day of the week.

[**lunarweekname**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/lunarweekname.htm)(date [, shift = 0 [,weekoffset = 0]])

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/date-time-functions.htm)

#### daystart

This function returns a value corresponding to a timestamp with the first millisecond of the day contained in the time argument. The default output format will be the TimestampFormat set in the script.

[**daystart**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/daystart.htm)(timestamp [, shift = 0 [, dayoffset = 0]])

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/date-time-functions.htm)

#### dayend

This function returns a value corresponding to a timestamp of the final millisecond of the day contained in time. The default output format will be the TimestampFormat set in the script.

[**dayend**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/dayend.htm)(timestamp [, shift = 0 [, dayoffset = 0]])

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/date-time-functions.htm)

#### dayname

This function returns a value showing the date with an underlying numeric value corresponding to a timestamp of the first millisecond of the day containing time.

[**dayname**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/dayname.htm)(timestamp [, shift = 0 [, dayoffset = 0]])

### Day numbering functions

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/date-time-functions.htm)

#### age

The age function returns the age at the time of timestamp (in completed years) of somebody born on date\_of\_birth.

[**age**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/age.htm)(timestamp, date\_of\_birth)

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/date-time-functions.htm)

#### networkdays

The networkdays function returns the number of working days (Monday-Friday) between and including start\_date and end\_date taking into account any optionally listed holiday.

[**networkdays**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/networkdays.htm) (start:date, end\_date {, holiday})

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/date-time-functions.htm)

#### firstworkdate

The firstworkdate function returns the latest starting date to achieve no\_of\_workdays (Monday-Friday) ending no later than end\_date taking into account any optionally listed holidays. end\_date and holiday should be valid dates or timestamps.

[**firstworkdate**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/firstworkdate.htm)(end\_date, no\_of\_workdays {, holiday} )

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/date-time-functions.htm)

#### lastworkdate

The lastworkdate function returns the earliest ending date to achieve no\_of\_workdays (Monday-Friday) if starting at start\_date taking into account any optionally listed holiday. start\_date and holiday should be valid dates or timestamps.

[**lastworkdate**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/lastworkdate.htm)(start\_date, no\_of\_workdays {, holiday})

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/date-time-functions.htm)

#### daynumberofyear

This function calculates the day number of the year in which a timestamp falls. The calculation is made from the first millisecond of the first day of the year, but the first month can be offset.

[**daynumberofyear**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/daynumberofyear.htm)(date[,firstmonth])

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/date-time-functions.htm)

#### daynumberofquarter

This function calculates the day number of the quarter in which a timestamp falls.

[**daynumberofquarter**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/daynumberofquarter.htm)(date[,firstmonth])