Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

gulshanrohilla
Contributor

Issue in Makedate in QlikView

Hi Guys,

I have written the following code. Below is the screenshot

issue1.PNG

issue2.PNG

and following is the result

issue3.PNG

Can anyone Please help me...why this is happening..

I tried to check by sending the output of the TestDate Field into excel and i have found that they are existing with Timestamp. thats why they different on frontend.

Thanks in advance

Tags (1)
1 Solution

Accepted Solutions
gulshanrohilla
Contributor

Re: Issue in Makedate in QlikView

I Just want that same dates occur only once but in my case it occurs twice.

and Yes after adding Date# and Date it works because initially QlikView taken the dates as two different dates because of time stamp. I was too shocked why the timestamp has been generated. but after applying the above functions it return only date w/o any timestamp

20 Replies
rajankasbe91
New Contributor III

Re: Issue in Makedate in QlikView

Hi Gulshan,

from online help

MakeDate(YYYY [ , MM [ , DD ] ] )

Returns a date calculated from the year YYYY, the month MM and the day DD.

If no month is stated, 1(January) is assumed.

If no day is stated, 1 (the 1:st) is assumed.

Examples:

makedate(1999) returns 1999-01-01

makedate(99) returns 0099-01-01

makedate(1992,12) returns 1992-12-01

makedate(1999,2,14) returns 1999-02-14

Regards,

Rajan

Re: Issue in Makedate in QlikView

Try to change the variable with this and make Numeric date also like Date#

Let vDumpDate = Floor(NUM(Date(Date#(Makedate(2017,09,01),'DD/MM/YYYY'),'DD/MM/YYYY'));

gulshanrohilla
Contributor

Re: Issue in Makedate in QlikView

Hi Anand,

Thanks in advance...I tried it but didn't works

MVP
MVP

Re: Issue in Makedate in QlikView

What if you try like: Date(Floor(MonthEnd('$(vDumpDate)'), 'DD/MM/YYYY') as Test Date

kavita25
Valued Contributor

Re: Issue in Makedate in QlikView

Try with simple logic:

let vDumpDate=Date((Makedate(2017,09,01)),'DD/MM/YYYY');

Date(Monthend('$(vDumpDate)'),'DD/MM/YYYY') as TestDate

Hope it helps.

Re: Issue in Makedate in QlikView

In variable try only this

Let vDumpDate =Date(Makedate(2017,09,01),'DD/MM/YYYY')

Re: Issue in Makedate in QlikView

Why go through the hassle if your variable will store the date in number format.... try this

LET vDumpDate = Floor(MakeDate(2017, 9, 1));

and then this

[ABC]:

LOAD ....

     Date(Floor(MonthEnd($(vDumpDate))), 'DD/MM/YYYY') as TestDate

FROM ...

gulshanrohilla
Contributor

Re: Issue in Makedate in QlikView

Thanks Guys now it has been resolved

Re: Issue in Makedate in QlikView

What was the issue?

Community Browser