Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
madhubabum
Creator
Creator

How we can get Last updated Month ?

Hi Experts,

Here we are creating the master calendar for getting yearmonth, Script as following

  LOAD

      Distinct

             timestamp(Monthstart(Key))                            as  MonthStart,

             timestamp(MonthEnd(Key))                             as  MonthEnd,

            Year(floor(Key))&NUM(Month(floor(Key)),'00')   as  MonthName

   Resident tmp_table Order by Last ModifiedDate desc;


OutPut : 201512, 201601

But here i am getting the Last ModifiedDate order of 12 and 01 (Months)

Note : But my Last Updated files are the following

QVD Name   Last ModifiedDate

File1.qvd       23-12-2015 10:45:23

File2.qvd       10-01-2016 09:15:30

But, Here i am getting 12 month , But I want to get 01 .....

How we can achieve this scenario, ...any suggestions ?

Thanks in advance,

Madhu



3 Replies
MK_QSL
MVP
MVP

What is Key here?

nilesh_gangurde
Partner - Specialist
Partner - Specialist

Hi,


Convert  the date in the Date Format first using the Date# function if the date is in text form.

and then apply your functions like Year(), Monthname() on the Date Field.

Regards,

Nilesh

sunny_talwar

Not sure I understand what your problem is? For the two qvd files what is your required MonthName?