The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
[SOLVED] Create calendar week out of date (German definition of calendar week)
Hello,
I'd like to analyze the number of contracts by calendar week based on a data extract which shows all contracts including the date of contract creation. The output table should include the number of created contracts grouped by product group, calendar week and year.
I transformed the contract creation date to calendar week using the operator "Date to Numerical" (time unit = week, week relative to year). Unfortunately the calendar week is generated based on the definition used in the US meaning that Sunday is the first day of a week. Is it possible to change the default settings so that the calendar week is generated according to the German definition (Monday is the first day of a week, each week has seven days, for the calendar week end of December / beginning of January the Thursday indicates to which year the calendar week belongs).
Thanks
Sylvia
I'd like to analyze the number of contracts by calendar week based on a data extract which shows all contracts including the date of contract creation. The output table should include the number of created contracts grouped by product group, calendar week and year.
I transformed the contract creation date to calendar week using the operator "Date to Numerical" (time unit = week, week relative to year). Unfortunately the calendar week is generated based on the definition used in the US meaning that Sunday is the first day of a week. Is it possible to change the default settings so that the calendar week is generated according to the German definition (Monday is the first day of a week, each week has seven days, for the calendar week end of December / beginning of January the Thursday indicates to which year the calendar week belongs).
Thanks
Sylvia
0
Answers
unfortunately you cant select the locale for the Date to Numerical operator. But i think you can use Date to Nominal and Parse Numbers afterwards as a workaround.
Here is a example process: Best,
Nils
thank you very much for your great solution. Do you have also an idea how to add the year of the calendar week? E. g. the 31st of December 2001 belongs to calendar week 1 of the year 2002 and not 2001.
If there is no process available I would use a matching table.
Best regards
Sylvia
this is also possible by extending the process a little bit: Best,
Nils
thank you for your reply. The extended process is using the calendar year for each date but the year of the date is sometimes different to the year of the assigned calendar week. In Germany calendar weeks include sometimes dates out of two years (e. g. the 31st of December 2001 belongs to calendar week 1 of the year 2002). Is it possible to calculate the year of the calendar week?
Best regards
Sylvia
the process should work exactly as you have described it. Here is an example for the 01.01.2012: Best,
Nils
thanks, the result of your process is year 2012 and week 52 for the date 01.01.2012. The calendar week is correct but it belongs to 2011 and not 2012. Maybe my local settings are leading to another result as you can see.
In the meantime I've created a table which includes calendar week and year for each date in the last past years. Using the operator "join" it is possible to assign the calendar week and the year of the calendar week to each date.
Best regards
Sylvia
But if it works now the way you have described it everything then :-)
Best,
Nils
Hi Nils,
I'm new to rapidminer studio 8, I'm trying to get the same thing done with the ISO weeknumbering instead of the US format. Can you please give me guidance how to do it in rapidminder studio 8.
Thank you,
Dong
I figured out how to edit the xml file, got it going already