Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
arethaking
Creator II
Creator II

Date ,Date# Vs MakeDate

Hi All,

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

Thanks in advance.

1 Solution

Accepted Solutions
qlikviewwizard
Master II
Master II

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.

View solution in original post

4 Replies
Anil_Babu_Samineni

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

Start from here

https://help.qlik.com/

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Peter_Cammaert
Partner - Champion III
Partner - Champion III

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
Specialist III
Specialist III

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

qlikviewwizard
Master II
Master II

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.