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: 
Not applicable

Extract year from year

hi All,

I have a requirement, where in i should show week number extracting from year field.

In detail, week(year) should have list of 52 or 53  weeks of that particular year.

If i select, 2014, feb, week should display 5,6,7.

Quick response is appreciated.

Thanks in advance,

Smitha

1 Solution

Accepted Solutions
its_anandrjs
Champion III
Champion III

From this you get week

Week(YourDateField) as Week

Correct way is use Datefield for the different date field creation like

Year(YourDateField) as Year,

Month(YourDateField) as Month,

Week(YourDateField) as Week

Num(Month(YourDateField)) as NumMonth,

'Q' & ceil(month(YourDateField) / 3)  as Quarter

and so on

View solution in original post

8 Replies
its_anandrjs
Champion III
Champion III

From this you get week

Week(YourDateField) as Week

Correct way is use Datefield for the different date field creation like

Year(YourDateField) as Year,

Month(YourDateField) as Month,

Week(YourDateField) as Week

Num(Month(YourDateField)) as NumMonth,

'Q' & ceil(month(YourDateField) / 3)  as Quarter

and so on

MK_QSL
MVP
MVP

Add below in your script...

Week(DateField) as Week

rustyfishbones
Master II
Master II

Try

Week(Date) as Week

Not applicable
Author

Thank you ☺

Not applicable
Author

thanks☺

Not applicable
Author

Thanks☺

MK_QSL
MVP
MVP

Close the thread by selecting correct/helpful answer.

its_anandrjs
Champion III
Champion III

Hi,

If you got correct answer so mark the thread as correct for the reference for others.

Regards