Based on Gregorain calendar, every week of a year has a number from 1 to 52, 53 or 54. Use this tag for instance if you want to calculate the weeknumber from a certain date or vice versa. You also might include the date tag. This tag is independent of programming language.
Questions tagged [week-number]
603 questions
0
votes
1 answer
how to get weak days of a particular week for a selected month and year in rails?
I want to get all the weak days of a particular week, for the selected year and month. I am getting data like year= 2015, month= 6 ,and weeknumber = 2 in controller. how to get week days for this particular data in rails?
i want a method like this…

John
- 1,273
- 3
- 27
- 61
0
votes
2 answers
Sum the values from the days in a specific week in Excel
So I have some rows of data and some columns with dates.
As you can see on the image below.
I want the sum of the week for each row - but the tricky thing is that not every week is 5 days, so there might be weeks with 3 days. So somehow, I want to…

Niclas
- 1,069
- 4
- 18
- 33
0
votes
1 answer
Calculate average returns for each week of the month over a 10yr period in R
I have 10 years of daily returns in a xts object.
I would like to produce an output that shows me what the "Average" returns have been over the 10 year period. For example:
Week1 1.95
Week2 -2.7
Week3 1.56
Week4 1.20
week5 …

Malik
- 71
- 1
- 9
0
votes
1 answer
Remove gaps in a plot when plotting weekwise yealy data when the weekyear is numeric
I am plotting price changes week-wise with the x-axis in the format "201301" where 2013 is the year and 01 is the week. I get gaps between the years after week 52 i.e. "201352" to "201399" since it is in an integer format. How do I remove the…

Kinjal
- 154
- 2
- 8
0
votes
4 answers
Delphi week number function based on system start of week
The DateUtils.WeekOfTheYear function is great but it uses the ISO 8601 standard definition of a week. That is, a week is considered to start on a Monday and end on a Sunday. I need a similar function that determines the week number based on the…

fullerm
- 406
- 1
- 8
- 23
0
votes
1 answer
How to get MySQL to return the correct year number for "week 53 of 2012" using "mode 7"
How would I get MySQL to tell me that '2013-01-01' is week number 53 of 2012?
I'm using mode 7 for the definition of a week.
I can get the week number easily enough by using WEEK('2013-01-01', 7)
The problem is that, of course, YEAR('2013-01-01')…

Wodin
- 3,243
- 1
- 26
- 55
0
votes
1 answer
Keeping the class date for aggregated time series
I'd like to aggregate time-series data to get weekly data, but doing so the class of the temporal variable becomes "character" instead of "Date", losing therefore any cool features of being a date.
This is quite annoying, especially when I need to…

Emiliano
- 149
- 1
- 9
0
votes
2 answers
How to Update Week Number in SQL?
I have a following which are displayed order by date. I want to group each weekseries as below.
Select tq.ID,
CONVERT(VARCHAR(10),tq.DateCreated,101)WeekDate,
DATENAME(WEEKDAY,tq.DateCreated)WeekDays,
CASE When…

SHEKHAR SHETE
- 5,964
- 15
- 85
- 143
0
votes
2 answers
Retrieve data based on current ISO week and backwards
I have to work with data retrieved and grouped on a weekly basis (ISO week) and my DB is structured on a daily basis (field: DATE). I need to write down a code which is rolling, so that given the current date, it calculate the week and the retrieve…

DaveZZ
- 1
0
votes
1 answer
Calculate year week number from given period in VBScript
Scenario: Trying to find out the End Week Number(current year's week number) and Start Week Number using a given period. Suppose PeriodWeeks = 10. That means from today's week number to last 10 weeks which surely will go to last year in current…

PineCone
- 2,193
- 12
- 37
- 78
0
votes
0 answers
.NET MonthCalendar.ShowWeekNumbers Property - Which rule applies?
In .NET control MonthCalendar you can enable display of week number. Does anybody know which rule applies for these number?
.NET provides several rules for calculating the week number, see Calendar.GetWeekOfYear - and the most important one…

Wernfried Domscheit
- 54,457
- 9
- 76
- 110
0
votes
0 answers
How can I find the week beginning date of a week number in MySQL?
I have a set of sales numbers and am trying to rank them by week. The query works great, except that I end up with a week number. How can I convert that week number to a beginning of week date?
SELECT
SUM(`Sales`) `Record`,
Week(`DateTime of…

C. Michael Boegner
- 21
- 2
0
votes
1 answer
php get correct date by week one of the year using strtotime
I used this code to get the 1st date, of the 1st week, of the year:
echo date('Y-m-d',strtotime('2018W01')); #JAN 1 is Monday, returned 01/01
echo date('Y-m-d',strtotime('2013W01')); #JAN 1 is Tuesday, returned 12/31
echo…

xam
- 452
- 2
- 7
- 15
0
votes
1 answer
Calculation with WEEK in oracle
I am comparing two dates in oracle where I stuck at one point in which I have to compare my week with the current week.
Suppose today is 05-Jan-2015 and it's a first week and input date is 29_Dec-2014 and I'm executing below statement to…

Pratsam
- 162
- 1
- 12
0
votes
1 answer
Start and finish date of each week of the year
I am trying to display on a page each week of the years start and finish date so like below
Week 1 - 1/1/2015 - 7/1/2015
Week 2 - 8/1/2015 - 14/1/2015
and so forth is there any way to achieve this my end result will be displaying how many leads…

Nathan
- 509
- 4
- 16