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
ASP.NET MVC calculate week
I have a ASP.NET MVC 4 project with EF. In my (create) view I want to display beside an EditorFor for a date the week number of the current year.
I have a helper:
@model Helios.Models.tablename
@helper Week(DateTime dt)
{
CultureInfo ciCurr =…

Misi
- 748
- 5
- 21
- 46
0
votes
0 answers
Count many weeks between current date and the date on sqlite database Android
I've got a question about counting the weeks between the current date and the date on SQLite.
I am trying to put date data on DBAdapter Class to SharedMemory :
SharedPreferences user = getSharedPreferences(USER, 0);
SharedPreferences.Editor editor =…

wdyz
- 185
- 4
- 19
-1
votes
1 answer
how to convert Week/Year (10/2018) to date format
I have pandas dataframe in the format 10/2018, 10 represents the week of the year and 2018 the year. How do I convert them to complete date which will be march 5th 2018
week/year Date
10/2018 05-03-2018
I have pandas…

anagha s
- 323
- 1
- 4
- 15
-1
votes
1 answer
Weekly counter with text display
error message screenshotA screenshot of website interfaceMy day will be made more beautiful if I get some assistance. Using JavaScript or any other language is there a way I can develop a weekly counter that will display certain text per week, for…
-1
votes
1 answer
retrieve week number from datetime excel in python
I open .xslx with pandas.
value
date of pickup
ABC123
03.08.2022 11:24
ABC234
27.07.2022 15:45
ABC434
18.05.2022 02:35
ABVC122
28.07.2022 10:10
I need to keep only rows for previuos week. In my example today is 03.08.2022 wk number…

Angelo Malfitano
- 27
- 6
-1
votes
1 answer
How to get week of month from given date
How to get weekOfMonth value from given date.
Today "2021-19-12" Dec 19th come under 4th week
But passing any date value, how to get week number specific to date month.

kiran
- 4,285
- 7
- 53
- 98
-1
votes
1 answer
Extract another value based on an input (or automated input)
Not seen this answered elsewhere. I want to automate a file to put in three headers based on the current week. Firstly i cant figure out how to get the current week. A similar thing to the excel formula weeknum(today()). So this week is week 25 in…

H Card
- 31
- 4
-1
votes
1 answer
PostgreSQL returns wrong date_part for week for date 2021-01-01
If I run the following query I get really strange results. I get week 1 (as expected) only starting from Monday 4th of January. I using this in a group by query to count covid cases per week and this totaly ruins my day :/
SELECT date_part('week',…

Daniel Gerber
- 3,226
- 3
- 25
- 32
-1
votes
1 answer
Php date function giving back incorrect week number
I have an issue with the php date function when getting the week it is incrementing it by 1.
For example:
2020-11-31 is becoming week 49 instead of week 48.
Code as follows:
date("W",strtotime("2020-11-30"));

Matthew Scicluna
- 87
- 7
-1
votes
1 answer
Calculate MySQL's WEEK Function with mode argument In Oracle
I would like to know is there a way to calculate Mysql's week function in Oracle. I know that we can get week number by using to_char([date],IW') which considers Monday as first date of week.
I know that MySQL has 7 modes with week function, can I…

Praveenkumar
- 1
- 3
-1
votes
2 answers
Add date filter list in Tableau
I have created time series dashboard where x-axis are week numbers (May4, 2020, etc.). The week number I have created from actual week number and year:
DATETRUNC('week',DATEPARSE("w-yyyy",STR([Week])+"-"+ STR([Year])))
Now I want to create a list…

Robbie
- 121
- 11
-1
votes
1 answer
SQL Presto - Week function to star on a Sunday
I'm trying to extract the week number from a date, and I want the week to be counted from Sunday to Saturday. This is what I currently have, but I can't seem to find any solution for this is SQL Presto.
SELECT WEEK(date) AS weeknum
Can this be…

Rotem Kagan
- 1
- 1
- 1
-1
votes
1 answer
Javascript - How do i get every date in a week from a given week number and year
How do I get every weekday (monday through friday) in a week from a given week number
input
var weekNumber = "week + " " + year"; //"35 2020"
Wanted output
var weekArray = ["2020-08-24", "2020-08-25", "2020-08-26", "2020-08-27", "2020-08-28"];
-1
votes
1 answer
BigQuery: How to find Scaled Average Weekly Sales?
Scenario to Solve:
Our ultimate aim is to get Scaled AverageWeeklySales(AWS) with below formulae:
Scaled AWS = (Number of Weeks article has had a record within the store / maximum Number of Weeks in data) * (AWS / Number of Weeks)
Input 'table_a'…

user12345
- 499
- 1
- 5
- 21
-1
votes
2 answers
Convert column with YYYY-MM-DD to week number
I am trying to get the week number from my EventDate column which has YYYY-MM-DD data, at the moment I am writing SQL in R but if anyone has any idea how to write R code only would be great too.
I have tried Datepart but it didn't work.
e.g…

Pegah
- 53
- 1
- 1
- 4