Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
shamitshah
Partner - Creator
Partner - Creator

Derive MonthYear from Date

Hi,

I have the following to derive the date, which is working fine:

Date(Date#([FY KPI], 'DD-MM-YYYY')) as FYKPIDate

I tried the following to derive the monthyear but it does not seem to work:

Date(MonthStart(Date#([FY KPI])), 'MMM-YY') as FYKPIMonthYear

Any ideas?

Thanks

Shamit

1 Solution

Accepted Solutions
maxgro
MVP
MVP

Date(MonthStart(Date#(yourfieldhere, 'DD-MM-YYYY')), 'MM-YYYY')  as FYKPIMonthYear

View solution in original post

7 Replies
tamilarasu
Champion
Champion

Hi Shamit,

Date(Date#([FY KPI], 'DD-MM-YYYY'),'MMM-YY') as FYKPIMonthYear

maxgro
MVP
MVP

Date(MonthStart(Date#(yourfieldhere, 'DD-MM-YYYY')), 'MM-YYYY')  as FYKPIMonthYear

shamitshah
Partner - Creator
Partner - Creator
Author

Hi Tamil,

That does not seem to work either.

I also tried

Date(Date#([FY KPI], 'MMM-YYYY'))

Thanks

Shamit

shamitshah
Partner - Creator
Partner - Creator
Author

Thanks Maxgro!

Works perfectly.

Shamit

Anil_Babu_Samineni

How about this

date(monthstart(yourfieldyear), 'MMM-YYYY') as FYKPIMonthYear

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
maxgro
MVP
MVP

further explanation about the dates

Get the Dates Right

Why don’t my dates work?

tamilarasu
Champion
Champion

Hi Shamit,

You should read below blog post to understand the difference between Date() and Date#() function.

The Date Function