Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Our next Qlik Insider session will cover new key capabilities. Join us August 11th REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
AnnaQlik
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
tresesco
MVP
MVP

May be just Month()

Month(datInkomDatum) as datInkomMÅN

View solution in original post

4 Replies
wandererroch
Contributor III
Contributor III

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.
amrinder
Creator
Creator

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.

tresesco
MVP
MVP

May be just Month()

Month(datInkomDatum) as datInkomMÅN

View solution in original post

AnnaQlik
Partner
Partner
Author

Thank you Tresesco!! Embarrassingly simple ^^