616 questions
0
votes
1
answer
82
views
Calender weeks with Oracle to_char function
in the calendar I see both 30th and 31st of Dec in years 2025 and 2026 fall in the same week but using the to_char function to create year-week field I will get different weeks
select
to_char(...
0
votes
1
answer
65
views
CarbonPeriod returns duplicate week month [duplicate]
I am formatting the dates of all weeks in a date range that exceeds 1 year using CarbonPeriod:
$period = CarbonPeriod::create('2024-01-01', '1 week', '2025-01-31');
foreach ($period as $date) {
...
0
votes
0
answers
61
views
Week of month sequence - reset every 4th Monday across years
A similar question to this resolved post I raised.
Week of month sequence across years
I want to create a sequence of week numbers across a list of dates, but have the sequence reset on the 4th Monday ...
2
votes
2
answers
147
views
Week of month sequence across years
I am using a solution from Leila Gharani on creating a sequence of week numbers across a list of dates:
=WEEKNUM(DATE(YEAR([@dates]),1,DAY([@dates]-WEEKDAY([@dates],3))))
Case 2: Using the WEEKDAY() ...
0
votes
0
answers
47
views
Date hierarchy including month and isoweek number, causing aggregate issues in visuals
I have created a date hierarchy year > month > isoweek > date.
I get a problem correctly visualizing aggregates using this hierarchy. Example: when presenting revenue in a matrix using this ...
0
votes
1
answer
187
views
Assign week numbers to dates based on multiple conditions in excel
I'm trying to assign week numbers to dates between 2022 and 2024 such that it satisfies the requirements below:
Week 1 starts on the first Sunday of the year.
Dates before the first Sunday should be ...
0
votes
0
answers
280
views
Calculate Week Number of Year in T-SQL without DATEFIRST function or other database objects
I am working on a SaaS application that connects to a Microsoft SQL Server database, using T-SQL language.
I cannot develop stored procedures, user-defined functions, or any database objects.
I am ...
1
vote
1
answer
119
views
How to reset Week Number when the Year changes in Google Sheets
I use the following formula to determine the week number for a given period. Is it possible to reset the week number when the year changes?
=INDEX(IFNA(TEXT(VLOOKUP(A2:A, {UNIQUE(FILTER(A2:A, A2:A<&...
0
votes
2
answers
85
views
Find totals by week
I have a spreadsheet with various dates(a) (sequential) and pay(G).
I would like to fill in the Week total column(h) with the total made for the week in the last week of the row. In the attached ...
0
votes
1
answer
39
views
Formula evaluation returns weird value
I created a formula in excel to get the iso.weeknumber in 2 numbers:
=JAAR(A2)&" "&ALS(LENGTE(ISO.WEEKNUMMER(A2)=1);"0"&ISO.WEEKNUMMER(A2);ISO.WEEKNUMMER(A2))
The ...
0
votes
1
answer
565
views
How to Filter Data by Week Number and Year
I have 3 columns with reference number in column A, a unique number in column B, and a further reference in column C. Associated to each are figures which in a row which is in a column assigned to a ...
0
votes
1
answer
338
views
Quicksight displays wrong week number between two years
I use this function to get week number in quicksight
dateDiff(truncDate('YYYY', {Date de Souscription}), {Date de Souscription}, 'WK')+1
This works correctly for 2023:
As you can see on this picture,...
0
votes
1
answer
3k
views
How to find week number for the previous week in Power Automate?
I have used this formula:
add(div(dayOfYear(utcNow()),7),1)
to calculate the week number of the current date. It works well. However, I actually need the week number of the previous week, because ...
0
votes
1
answer
123
views
How to get previous/next week number and year in ASP.NET Core 6
I have this Week based navigation in the UI and on click on the left/right arrows I was calling an API and returning the data with previous week/year number and next week/year number but now I need to ...
0
votes
1
answer
38
views
Acumatica Add Delivery Week to Sales Order Screen
I try to had Delivery Week in Sales Order Screen.
I've taken roughly the sames attributes as in the screen Weekly Crew Time Entry (EP307100) but I have an error when saving the form : Arithmetic ...
1
vote
1
answer
100
views
Sort custom text in chronological order
I have created a calculated column which simply concatenates the week number along with the week start date and is of course stored as a text.
What I want to do is actually sort this text column in ...
0
votes
1
answer
33
views
how to set numbering to column values?
I'm having a df like this.
timeframe week
0 2023-06-14 24
1 2023-06-21 25
2 2023-06-28 26
3 2023-07-05 27
4 2023-06-12 28
5 2023-06-19 29
6 2023-06-26 30
I want to get the ...
3
votes
2
answers
1k
views
Convert Weeknumber to date using Python and Pandas
I need help extracting the weekdate from my df:
df = pd.DataFrame({
'weeknum':[12,24,36,48,50],
'year':[2023,2023,2023,2023,2023]
})
my desired output is to have a new column named "...
1
vote
1
answer
1k
views
PowerBi - Current Week
I have a Multi-row card where it shows how many CLL, PLL, and KG our warehouse have packed "today".
However I would like to have similar card which sums up the current week.
(Meant as a fun ...
1
vote
2
answers
795
views
PowerBI DAX measure to restrict calculation to complete, 7-day weeks in current context
The end goal is to be able to calculate an AVERAGE weekly value for something while only considering days which are part of weeks which are fully included in the current filter context. As an ...
1
vote
0
answers
1k
views
PowerBI Date hierarchy with Week Number
Date Hierarchy in PowerBI:
How can I create manually a date hierarchy to contain week number?
Here's what I have:
What I want:
but with weeknumber included in this hierarchy.
1
vote
0
answers
30
views
MongoDB aggregation by week, starting on sundays. How to merge week 0 to week 52 of the previous year?
So, i have an MongoDB aggregation that aggregates data from DB by weeks.
According to documentation of $week aggregation:
Returns the week of the year for a date as a number between 0 and 53.
Weeks ...
0
votes
1
answer
81
views
Calculate working hours with dynamic week numbers for a work schedule
I would like to have an overview of the available hours per employee for the current and coming weeks. Wk1 (week 1) is the current week. The result would be like this:
enter image description here
I ...
0
votes
1
answer
22
views
Assign Week Number Column to Dataframe with Defined Dict in Python
I have been trying to get this to work and cannot find a solution. I have data that looks like this in dataframe (df):
index plant_name business_name power_kwh mos_time day month ...
2
votes
2
answers
633
views
(Godot Engine) How to calculate the ISO week number of a specific date?
Using Godot 3.6 on Windows:
How to calculate the ISO week number of a date given the following parameters: day, month, year?
I could not find a way to calculate the week number from the built-in class ...
0
votes
1
answer
199
views
Get the ISO 8601 Week of the Year in FreeMarker based on a date
I need to get the current week of the year based on a string date.
E.g. 07.03.2023 → Week 10 of 2023.
In the docs I found many helpers, but none for the week of the year.
<#assign aDate = theDate?...
0
votes
1
answer
2k
views
Outputting the Start Date & End Date Given the Week Number and the Year
I'm having a bit of trouble trying to get my =arrayformula() function to output the right response and would appreciate some help!
Here is the scenario:
Users lock in their data metrics in the '!...
0
votes
1
answer
2k
views
ISO 8601 Year- and Week numbers
I'm struggling with week sorting.
In details:
Measure for calculate weeks:
Year Week Column: =
CONCATENATE(
YEAR ([Date]),
" W" & FORMAT( WEEKNUM ([Date], 21), "00" )
)
...
0
votes
1
answer
67
views
Recover all weeks of a month in Oracle SQL
I would like to build a SQL statement to automatically retrieve information about all the weeks of a month.
For example, for the month of February 2023:
Retrieve the first week (Monday to Sunday): 30/...
0
votes
2
answers
1k
views
Creating a column that takes a Week Number and Year and returns a Date
I'm currently working with a dataframe where I created a Year and Week # column. I'm trying to create a new column Date that gives me the date for a from the Year and Week # columns.
This is what my ...
0
votes
2
answers
30
views
SQL Management Studio: Week Number based on a Mon-Sun week
How do I change the syntax datepart(week,[Tran Date]) as WeekNum to provide the week number based on a Mon-Sun week standard vs. Sun-Sat?
For example: I need Sun 2/13/2023 to report week number ...
0
votes
2
answers
159
views
Get week number for given month of year for presentation on calendar
I'm creating a calendar with Sunday being the start of each week and I want to present the week number of the year before each row of dates.
This is my calendar
my calendar
How can I add week numbers ...
1
vote
1
answer
285
views
ChartJS v3 custom displayFormats
I'm trying to add a string (Week) next to the week number in xAxes in Chartjs 3. But it shows a random number instead of the string.
Here is the part of my code in the options:
scales: {
x:...
0
votes
0
answers
155
views
How to use SimpleDateFormat week number (w) and weekday (u) coherently?
I would like to set up a functionality for Google Sheets that provides a start and end day for a given week index number of the year. When using the Utilities.parseDate and Utilities.formatDate ...
2
votes
2
answers
259
views
Python pendulum module returning wrong week number
The way iam trying to get the week number
import pendulum
from datetime import date
dt = pendulum.parse(str(date.today()))
week = dt.week_of_month
print(dt)
print(week)
Result
2023-01-19T00:00:...
2
votes
1
answer
107
views
Regroup By Quarters in Google Sheets
I have two rows in Google Sheets :
Row 3 YYYY-MM (Month) number
Row 5 YYYY-WW (Week) number
I want to regroup them by quarter, I have put one "ideal solution" and one alternative solution.
...
0
votes
1
answer
1k
views
How to get the week number given a date for Kotlin Mulitplatform without using java?
Note: The first week of the year is the one that has 4 January in it.
I'm trying to solve this problem where I want to know the week number given a date. And it can be solve by following the next ...
0
votes
2
answers
360
views
Unique Week (Monday - Sunday) Number Regardless Of What Year It Is
I would like to get the number of a week from a [Dates] column, starting with Monday as the first day of the week. I would like each week to be uniquely identified. Rather than rolling over at 52 to 1,...
1
vote
0
answers
117
views
Inconsistent behaviour of GregorianCalendar when created from ZonedDateTime
I'm writing some integration of legacy code that expects date/time as a GregorianCalendar.
So, I'm creating the GregorianCalendar using from(ZonedDateTime) method.
However, the result is showing some ...
-1
votes
1
answer
51
views
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/...
-3
votes
2
answers
762
views
Get start date and end date from week/month/year [closed]
I need to extract the start date and end date from a given year and week and return them as LocalDate:
Example: year / month / week : 2022 / 12 / 49 -> date_begin 05/12/2022 - date_end 11/12/2022 ...
0
votes
0
answers
64
views
Finding the number of items in inventory each week from sales data
I am aggregating data by week and need to find the number of items in inventory for each week. I have the date sold(Contract Date) and the date the item was added to the inventory. I also have a list ...
1
vote
2
answers
252
views
Count ISO_WEEK between two dates (potentially spanning across years)
This may be a fairly simple question but I can't find a simple solution anywhere. Is there a way to count ISO_WEEK between two dates (which also may span over multiple years) without subtracting the ...
0
votes
0
answers
27
views
week number of anydate from datepicker [duplicate]
I want to get the week number from the date picker that user select even if the date was past date;
String dateofweek= dateselect.getText().toString();
SimpleDateFormat format = new SimpleDateFormat(&...
0
votes
2
answers
357
views
How to get week number between two months?
I am running sql query in python, I have a requirement to dynamically generate dates and append it to my sql query.This script runs on every Monday. If the week of Monday falls between two months ...
0
votes
2
answers
2k
views
get start date of week from week number and year only
I have a dataset where the data is reported by week and year like: YYWW. I have split it into to columns: Year and Week.
I need to get a date from the week: Week_start_date. My weeks start at mondays, ...
-1
votes
1
answer
79
views
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 ...
0
votes
1
answer
46
views
Find value in table for ISOWEEKNUM - excel
I want to write sum for value for specific weeknum.
I solve preblem for mouth with code.
= SUMIFS('Izredni dogodek - Č'!$Q:$Q;'Izredni dogodek -
Č'!$D:$D;">="&$B13;'Izredni dogodek -...
0
votes
1
answer
132
views
Issue with detecting week number with COleDateTime::Format
I have two dates:
Monday 26/12/2022
Sunday 01/01/2023
Take this code:
CString strDate = L"2022-12-26 00:00:00";
COleDateTime datMeeting;
datMeeting.ParseDateTime(strDate);
const auto ...
0
votes
0
answers
41
views
how can I get date of the monday of previous week if I have a values like "yyyy-wk" for example 2022-41 using sql?
so I have a column that has the values like 2021-01,2021-02 and so on till the end of week for year and then 2022-01 and so on
I want to convert this to the date format "yyyy-mm-dd" for the ...