Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[resolved] How to define Week of the Month from yyyy-mm-dd Date

Hi, I'm not sure whether someone in this forum hv already asked this question or no. 

Please help me with, how to define WEEK OF THE MONTH, from a yyyy-mm-dd date?
maybe one simple sample-expression for tmap.

Thanks expert..

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi 
You can use function getPartOfDate() to get part of the date, eg:
TalendDate.getPartOfDate("WEEK_OF_MONTH", row1.DateColumn)

View solution in original post

4 Replies
Anonymous
Not applicable
Author

Hi
If you want to display week of month, try this pattern:
"yyyy-MM-dd F"

Regards
Shong
Anonymous
Not applicable
Author

Hi Shong,

I see the week now. 
But, anyway how can I get the Week directly as a "Number", not in the part of the Date.

The output, as per today date (getCurrentDate) is "2017-02-03 1" .
So instead of that, I need the output as "1" (today is first week of Feb).

Thanks in advance
Anonymous
Not applicable
Author

Hi 
You can use function getPartOfDate() to get part of the date, eg:
TalendDate.getPartOfDate("WEEK_OF_MONTH", row1.DateColumn)
Anonymous
Not applicable
Author

Nice, thanks Shong.