Questions tagged [weekday]

A day of the week. Used for questions related to programming problems that involve `weekday`: calculation, triggering an event, discovery of a specific day etc

462 questions
2
votes
2 answers

Code that can Identify the 6th day of the Month excluding weekend

Please can someone help me? I need a code that can identify every 6th of the Month on a rolling period excluding weekends. i would need the code to send an email every time it is past the 6th of each month. Please don't worry about the email part, I…
Tonas Max
  • 31
  • 4
2
votes
1 answer

How to get the weekday number from std::chrono::year_month_day in C++

In C++ 20, the following code will output the number (0-6) for the weekday of the input date: #include #include int main() { using namespace std; using namespace std::chrono; year_month_day dmy; cin >> parse("%d…
MarkR
  • 215
  • 3
  • 10
2
votes
4 answers

Is there a R function to find the next position of an element in a list

I want to create a function that returns the next day Here is what I got: next_day <- function(day){ + week = list('monday','tuesday','wednesday','thursday','friday','saturday','sunday') + pos <- index(day, week) + if(day=='sunday')…
2
votes
2 answers

How to highlight a cell containing the name of a weekday in a row based on =Today() in Google Sheets

I have a sheet with the names of the weekdays in row 1. I want to highlight the cell containing the value "Fri" on a Friday. I used the example from this answer: How do I highlight cells based on the day of the week in Google Sheets? However, I need…
Josh LS
  • 47
  • 4
2
votes
1 answer

Does R's 'weekdays' function get the date wrong?

I'm wondering if there is something wrong with my system or with the code I am using, but I seem to get the wrong answer from weekdays. Can someone please test if they get the same in their system? weekdays(as.Date("16/01/2021","%d/%m/%y")) #[1]…
user6376297
  • 575
  • 2
  • 15
2
votes
2 answers

To get weekday between two date in Postgresql

I need to get all week days in a given time interval. In postgresql, there are dow and isodow By mixing them together, may I write a function to retrieve weekdays?
husnu
  • 354
  • 3
  • 15
2
votes
1 answer

How do I get Python to extract weekdays from dates?

I'm quite new in the Python world and I need to extract the exact weekdays from a long column of specific dates in my dataset. The column looks like this: 0 1/5/2019 1 3/8/2019 2 3/3/2019 3 1/27/2019 4 2/8/2019 …
somo
  • 21
  • 1
2
votes
2 answers

Workdays for each month in list in python

python newbie here. I am trying to create a df where 1 column is a month 'YYYY-MM' which I have created in a dict below (tips on generating this using code would be appreciated). I am stuck trying to get the weekdays column populated using the…
purlla
  • 23
  • 3
2
votes
2 answers

COUNTIF Based on Day of Week

I have a column of dates as so... I want to count the number of Saturdays (or any other day of the week), in this column. One solution would be two create an extra column with the weekday number in it, and then run a COUNTIF formula over that…
Mr. J
  • 1,524
  • 2
  • 19
  • 42
2
votes
1 answer

Google Sheet formula to calculate nearest day of week based on date

I am trying to figure out how to best put this requirement into a formula to be used in CELL B1 in Google Sheets: If the date in cell A1 is a Sunday or Monday, cell B1 should show that week's date for Thursday, otherwise, it should show the…
2
votes
1 answer

how to make a day from date in LibreOffice?

I want to convert date into a Day I am using LibreOffice I used some of its syntax weekday and text but it returns nothing WEEKDAY("30-04-2019"; 1) is there any way to do that? in google sheet i used =TEXT(C7758,"dddd") but it didn't work how can…
Jose
  • 330
  • 1
  • 3
  • 13
2
votes
2 answers

calculating number of weeks in the basis of customized weekend

Different organizations might have a different week off. So, in this case, need to customize the week off. To do it I have tried the Sql query write in below DECLARE @dayName VARCHAR(9); SET @dayName = DATEName(DW, GETDATE()); IF(@dayName =…
Abdullah Al Mamun
  • 392
  • 1
  • 4
  • 13
2
votes
2 answers

Get monday of current week based on userform input

I am very new to VBA, so please bear with me. I have a userform that is going to eventually create a 2 or 6 week schedule look ahead. The userform has a textbox which automatically populates the Monday of the current week as the lookahead start…
sparkynerd
  • 81
  • 3
  • 15
2
votes
1 answer

SQLite to select dates within a range but without Sundays and some holidays

the following code WITH RECURSIVE dates(x) AS ( SELECT '2017-11-01' UNION ALL SELECT DATE(x, '+1 DAYS') FROM dates WHERE x<'2018-01-31' AND 'weekday'>0 ) SELECT * FROM dates; does not…
Pal Csanyi
  • 101
  • 1
  • 9
2
votes
1 answer

morris chart days customization issue

I am using morris line chart i want to show 7 days clients registration in chart but MON and Tue is not displaying in my chart. Please let know how can i fix this. I want to show weekdays like this chart. Morris.Line({ element:…
Sandeep
  • 973
  • 2
  • 13
  • 22