Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
Qlik Analytics Tour 2020 Online. Begins August 10th. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Partner
Partner

date(Floor(MyDate),'MMM')

Hi!

I have a timestamp and have managed to make it into only YYYY-MM-DD by using date-floor-function. It works perfectly!

When only using date-function, without floor, duplicates of the date appear, see the attached picture. Therefore I am using the floor-function aswell.

datInkomDatum,
date(Floor(datInkomDatum)) as datInkomDAG,

date(datInkomDatum) as datInkomTEST,

However, when I use the same method (date-floor-function) to get the months out, it shows duplicates of the months.

date(Floor(datInkomDatum),'MMM') as datInkomMÅN,

How do I get the months out like I did with the dates for datInkomDAG?

Thank you!

Labels (4)
1 Solution

Accepted Solutions
Highlighted
MVP
MVP

Re: date(Floor(MyDate),'MMM')

May be just Month()

Month(datInkomDatum) as datInkomMÅN

View solution in original post

4 Replies
Highlighted
Contributor III
Contributor III

Re: date(Floor(MyDate),'MMM')

Easiest way is to wrap the date in monthstart(). This will give you a consistent point of reference. Qlikview likes to hold on to the actual date in the background even when you ask only for the month portion.
Highlighted
Creator
Creator

Re: date(Floor(MyDate),'MMM')

Hi,

When you are using only Date function,May be due to different time available on same date it is treating it like different values. Try using Distinct like below:

 

Load Distinct

*,

date(Floor(datInkomDAG ),'MMM') as datInkomMÅN,

Load

*,

date(Floor(datInkomDatum)) as datInkomDAG 

from A.xlsx;

 

Let me know if it worked.

Highlighted
MVP
MVP

Re: date(Floor(MyDate),'MMM')

May be just Month()

Month(datInkomDatum) as datInkomMÅN

View solution in original post

Highlighted
Partner
Partner

Re: date(Floor(MyDate),'MMM')

Thank you Tresesco!! Embarrassingly simple ^^