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

format problem

Hi all,

in my script i generate a calendar:

Load

          Date(Date#('1/1/2008','D/M/YYYY')+RowNo()-1) as Date_,

          Year(Date#('1/1/2008','D/M/YYYY')+RowNo()-1) & Num(Month(Date#('1/1/2008','D/M/YYYY')+RowNo()-1), '00') as M_,

          WeekDay(Date#('1/1/2008','D/M/YYYY')+RowNo()-1) as WeekDay_

AutoGenerate

          Interval(Date#('31/12/2015','D/M/YYYY')-Date#('1/1/2008','D/M/YYYY'),'D');

The problem is that i need:

Year(Date#('1/1/2008','D/M/YYYY')+RowNo()-1) & Num(Month(Date#('1/1/2008','D/M/YYYY')+RowNo()-1), '00') as M_,

to be in a real date format YYYYMM instead of a concatenated number.

Can someone help me formatting this ?

Thanks a lot!

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Yes, one ')' too many:

=Date(Date#('1/1/2008','D/M/YYYY')+RowNo()-1,'YYYYMM') as M_,

View solution in original post

4 Replies
swuehl
MVP
MVP

Maybe like

Date(Date#('1/1/2008','D/M/YYYY')+RowNo()-1),'YYYYMM') as M_,

Not applicable
Author

Something seems to be not right with the ) after the 'YYYYmMM'

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     Try with this

     Date((Date#('1/1/2008','D/M/YYYY')+RowNo()-1),'YYYYMM') as M_

instead of

     Year(Date#('1/1/2008','D/M/YYYY')+RowNo()-1) & Num(Month(Date#('1/1/2008','D/M/YYYY')+RowNo()-1), '00') as M_,

Celambarasan

swuehl
MVP
MVP

Yes, one ')' too many:

=Date(Date#('1/1/2008','D/M/YYYY')+RowNo()-1,'YYYYMM') as M_,