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
-1
votes
1 answer
How to create 'Week column' based on another date column?
I have column 'jobstarttimeiso' and I want to create another column for Weeks of the year based on the date. How would I go about doing that? I am using Redash to query from redshift database. Please help! Thank you.

Phillip Le
- 17
- 6
-1
votes
1 answer
How To Rearrange Week Numbers In Python
I am trying to rearrange the week numbers in ascending order.
For example, I first extract the previous ten weeks from whatever the current date is (Feb 10, 2020). Then I convert my time variable (YYYY-MM-DD format) to weeks using df['week'] =…

shsh
- 684
- 1
- 7
- 18
-1
votes
3 answers
How to get week number and year from epoch
I have some data as below and need to get the weeknumber and year in the same row.
data.head()
+---------------+
| epoch |
+---------------+
| 1580495399964 |
| 1580495399334 |
| 1580495397591 |
| 1580495396967 |
| 1580495396331…

Charan
- 63
- 4
-1
votes
1 answer
Looking for a function that gives me all weekdays (monday, tuesday...) based on a variable "year"
As the title says I'm looking for a function in SQL-Server to retrieve all weekdays, based on a variable set as a year.
I know there should be two useful functions for this case, but I don't know how to use them properly nor I am good at writing…

Akr0n
- 13
- 1
- 6
-1
votes
1 answer
Return results per week using start date PHP
I'm trying to grab SQL data via PHP with a tally for case types each week to display like so:
Week 1 | Date From | Volume
Week 2 | Date From | Volume
Week 3 | Date From | Volume
and so on... without having to manually for each week. I have week…

gdr39
- 31
- 8
-1
votes
1 answer
Not converting yearweek function with QueryDSL
I would like to use the yearweek() function of QueryDSL, which is supported by QueryDSL. This function generates the query select year(table1.timestamp)*100 + week(table1.timestamp) as col_0_0_ [...]. This does, however, not return a correct result…

ssc-hrep3
- 15,024
- 7
- 48
- 87
-1
votes
1 answer
Group list of Dates to week number? [Android]
I am working on an android app that will display a list of data. For example, if you start to use app today(28.05.2018)(MO) and I must calculate week number and add 7 days this week or you are starting Friday I must add 2 days this week.
I tried…

TsigumEnes
- 131
- 1
- 14
-1
votes
1 answer
Why Java calender object return wrong WEEK_OF_YEAR and WEEK_OF_MONTH
By the following way I set date object to calendar instance.
But when I get the week of year , wrongly it returns week of the year as 1.
Same as week of the year, week of the month value also wrong. It return as 6. But it should be 5.
Following is…

gangatharan
- 781
- 1
- 12
- 28
-1
votes
1 answer
Replace string representation of week with week number in R
In my data file the week variable now is formatted like this
**week**
May 05 2014 - May 11 2014
May 12 2014 - May 18 2014
May 19 2014 - May 25 2014
I want to convert this now to, if possible, two variables week and year signaling the week…

User23
- 153
- 2
- 13
-1
votes
2 answers
R Week number from date starting on a Friday
I'd like to get week number in year which starts on Friday in R.
For example:
2016-01-01 to 2016-01-07 is 1st week of the year
2016-01-08 to 2016-01-14 is 2nd week of the year
Can you help?

Taz
- 5,755
- 6
- 26
- 63
-1
votes
1 answer
How to get total details of current week?
for wk in sorted(out.keys()):
rec_date = datetime.datetime(*xlrd.xldate_as_tuple(wk, inputfp.datemode)).isocalendar()[1]#search for dates of current week
if rec_date == datetime.date.today().isocalendar()[1]:#conditions to check current week dates
…

doubts
- 157
- 1
- 1
- 9
-1
votes
2 answers
Calendar instance providing wrong week number when calendar built with basic fields
I would like to understand why this happens, and how can i solve this small issue.
I would like to be able to get the week number from a java calendar instance after providing the day, the month and the year.
if i do:
Calendar…

JBoy
- 5,398
- 13
- 61
- 101
-2
votes
1 answer
How to know the week numbre from a goiven date in Laravel?
For Example, when I give it 01/01/2020 it should know that it's week 1 or 12/03/2020 it is week 13. All this in a Laravel app.

Rachid El Adnani
- 35
- 4
-2
votes
1 answer
SQLite: - find week of the month
I need to extract the week of the month i.e. 1-5 from the date. I am using below formula in python.
df['Week_no_Month']= ((df.DATE.dt.day-1)//7+1)
Now I want this implemented in SQLite.

Kanika Singhal
- 253
- 1
- 2
- 10
-2
votes
2 answers
How to display the time in this format?
The time should be displayed like this 0000:00:0:00:00 to the user which stands for YYYY:WW:D:HH:MM. I will need methods to add/reduce/set the time.
How can I use PHP DateTime() to achieve this? It should always be displayed in this format, even if…

termum
- 1
- 2