Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
swati_rastogi27
Contributor

Sorting Date in MMM-YYYY format in script

Hi All ,

Here is the list of Month Year values i have in my QVD:

Dec-2016

Jan-2017

Feb-2017

Mar-2017

Apr-2017

May-2017

Jun-2017

Jul-2017

Aug-2017

Sep-2017

Oct-2017

Nov-2017

Dec-2017

Jan-2018

For Incremental Load , i want to fetch data which is less than Jan-2018 and then concatenate recent data to it

I am using the statement :

Select <>

from <QVD>

where DATE_MONTH < date(MonthStart('Jan-2018'), 'MMM-YYYY')

so using this i don't get anything.

Tags (1)
1 Solution

Accepted Solutions

Re: Sorting Date in MMM-YYYY format in script

Hi Swati,

Select <>

From <QVD>

Where DATE_MONTH < Date(Date#('Jan-2018','MMM-YYYY'),'MMM-YYYY');

3 Replies
gerry_hdm
Contributor II

Re: Sorting Date in MMM-YYYY format in script

Hello

Format  the var in 'mm.yyyy'

gruß Gerold

anagharao
Contributor II

Re: Sorting Date in MMM-YYYY format in script

Try:

Select <>

from <QVD>

where date(DATE_MONTH,'MMM-YYYY') < date(MonthStart('Jan-2018'), 'MMM-YYYY')

Note: if the DATE_MONTH is a predetermined format define that using DATE# function

Re: Sorting Date in MMM-YYYY format in script

Hi Swati,

Select <>

From <QVD>

Where DATE_MONTH < Date(Date#('Jan-2018','MMM-YYYY'),'MMM-YYYY');