Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

arethaking
Contributor II

Date ,Date# Vs MakeDate

Hi All,

What is the difference between Date ,Date#Vs MakeDate?

Thanks in advance.

1 Solution

Accepted Solutions
Arjunarao
Honored Contributor II

Re: Date ,Date# Vs MakeDate

Hi,

Please read this HIC's blog and Qlik Help. It is crystal clear.

The Date Function

Why don’t my dates work?

https://help.qlik.com/en-US/sense/June2018/Subsystems/Hub/Content/Scripting/DateAndTimeFunctions/mak...

ExampleResult
makedate(2012)returns 2012-01-01
makedate(12)returns 0012-01-01
makedate(2012,12)returns 2012-12-01
makedate(2012,2,14)returns 2012-02-14

Hope this will help you.

4 Replies

Re: Date ,Date# Vs MakeDate

You will get many while start searching on google / Any SEO

Start from here

https://help.qlik.com/

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)

Re: Date ,Date# Vs MakeDate

The search box is also a useful tool to find information, as this topic has been discussed more than a hundred tilmes before. Anyway:

  • Date = a formatting function the formats an existing date value according to either the default date format or the format you specify as 2nd parameter
  • Date# = an interpretation function that takes an unknown (string) value and tries to convert it into a regular QlikView (binary) date value according to either the default date format or the format you specify as 2nd parameter
  • MakeDate = a function that takes individual date components (separate day, month and year values as parameters) and assembles them into a regular QlikView (binary) date value

Best,

Peter

rahulpawarb
Valued Contributor III

Re: Date ,Date# Vs MakeDate

In continuation to Peter's reply:

Date function example:

//This function will return Date field in MM/DD/YYYY format.

//You can mention format of your choice e.g. DD/MM/YY, DD-MMM-YY etc.

Date(DateKey, 'MM/DD/YYYY')  AS Date

Date# function example:

//This function will Interpret DateKey field in MM/DD/YYYY format.

//You can mention format of your choice e.g. DD/MM/YY, DD-MMM-YY etc.

Date#(DateKey, 'MM/DD/YYYY')  AS Date

MakeDate function example:

//This function will return Date field by combining Year, Month & Day fields.

MakeDate(Year, Month, Day)  AS Date

Regards!

Rahul

Arjunarao
Honored Contributor II

Re: Date ,Date# Vs MakeDate

Hi,

Please read this HIC's blog and Qlik Help. It is crystal clear.

The Date Function

Why don’t my dates work?

https://help.qlik.com/en-US/sense/June2018/Subsystems/Hub/Content/Scripting/DateAndTimeFunctions/mak...

ExampleResult
makedate(2012)returns 2012-01-01
makedate(12)returns 0012-01-01
makedate(2012,12)returns 2012-12-01
makedate(2012,2,14)returns 2012-02-14

Hope this will help you.