Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to find week of quarter using t-map

HI,

 

  How to find week of quater using tmap

 

  for example lets take 1st quarter (jan,feb,mar)  i want to know how many weeks are there in these three months

Labels (3)
2 Replies
Anonymous
Not applicable
Author

Hi
My idea is to calculate the number of days between two dates (such as 2019-12-31 and 2020-04-01) using the built-in function TalendDate.diffDate(Date date1, Date date2, "dd"), and then use this number to be divided by 7.

Regards
Shong
Anonymous
Not applicable
Author

Hi,

 

    You can use Java functions to do this part. There are couple of examples in the below link. You may have to add additional java libraries using tLibraryLoad component.

 

https://stackoverflow.com/questions/9963147/get-the-number-of-weeks-between-two-dates

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved