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
Questions tagged [weekday]
462 questions
4
votes
2 answers
How to truncate a date to the beginning of week (Sunday)?
I need to truncate dates to the start of week, which is Sunday in my case. How can I do this in PostgreSQL? This truncates to Monday:
date_trunc('week', mydate)

planetp
- 14,248
- 20
- 86
- 160
4
votes
1 answer
How to find a weekday from the given date in string?
I have a function in my app that saves the date in string into the database, but it can't save the day on that date. I have tried a short code on this. Suppose we have a date in string.
Code:
package main
import (
"fmt"
"strconv"
…

catter
- 151
- 2
- 16
4
votes
3 answers
How can I display rows values in columns sql server?
SQL FIDDLE DEMO HERE
I have this table structure for SheduleWorkers table:
CREATE TABLE SheduleWorkers
(
[Name] varchar(250),
[IdWorker] varchar(250),
[IdDepartment] int,
[IdDay] int,
[Day]…

Esraa_92
- 1,558
- 2
- 21
- 48
4
votes
2 answers
Java: Finding the weekday of a calendar date which is inputted by the user
i am a programming enthusiast currently studying for Business Informatics. We have started programming with Java for two months now and i found this website to be of tremendous help in most of the cases i had to write some code for my assignments.…

ibu
- 150
- 3
- 17
4
votes
3 answers
How to get very short week day names in Android like Google Calendar app
I am finding a solution to get very short week day names like Google Calendar App.
The below is what I tried:
String[] shortWeekDays = DateFormatSymbols.getInstance(Locale.getDefault()).getShortWeekdays();
The result is
Sun, Mon, Tue, Wed, Thu,…

LHA
- 9,398
- 8
- 46
- 85
4
votes
2 answers
EKEvent incorrect date when allday is set
If today is Tuesday 2PM May 6th
event.startDate = [[NSDate alloc] init];
event.allDay = YES;
[dateFormat setDateFormat:EEEE, MMMM dd, yyyy];
NSString* dayStr = [dateFormat stringFromDate:event.startDate];
timeDetails.text = [NSString…

kos
- 1,357
- 9
- 21
4
votes
1 answer
Dataframe Row Selection by Weekday of Index in Python
I am trying to select every Friday in a dataframe of daily stock price closes. I read and tried the suggestion in this link, specifically:
Fridays = df[df.index.weekday == 4] #Fridays
but I get the following error:
AttributeError: 'Index' object…

user2719480
- 43
- 3
4
votes
4 answers
How to get day from specified date in android
Suppose my date is 02-01-2013
and it is stored in a variable like:
String strDate = "02-01-2013";
then how should I get the day of this date (i.e TUESDAY)?

Android is everything for me
- 3,781
- 4
- 28
- 37
3
votes
4 answers
Javascript get localized weekday without a DateTime object
I at the moment have the day values as strings. (e.g. "monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday") but no date.
The days describe opening hours of a shop and I would like to translate these string values dynamically…
user18890175
3
votes
1 answer
How to get all dates and weekdays in current month in flutter
I want to get current months all dates and weekdays like below image
i get all dates with below code
DateTime now = DateTime.now();
late DateTime lastDayOfMonth;
lastDayOfMonth = DateTime(now.year, now.month + 1, 0);
Row(
children:…

MohammedAli
- 2,361
- 2
- 19
- 36
3
votes
2 answers
VBA - If Previous Day is a Bank Holiday, Open File From Previous Working Day
I am struggling with working this one out. Basically, what I currently have is code to open the previous working days file.
x = Weekday(Date, vbSunday)
Select Case x
Case 1
x = 2
Case 2
x = 3
Case…

Jason
- 47
- 1
- 7
3
votes
2 answers
Java Date find day
I need to know which day and day name is on a specific date. And somehow I made a mistake because for years with 19.. it works but at 2000 I can't get the right day anymore. For example if I use the date 9.1.2001 it doesn't say me the day, instead…

Jan M
- 138
- 9
3
votes
6 answers
Need to find next and previous working day in oracle
My query is somewhat like this:
select 1 from dual where :p1_task_date in (sysdate,sysdate+1,sysdate-1) and :p1_task_id is not null
This works fine, but I wanted to get next/previous working days (next/previous week days) instead of sysdate+1 and…

user573906
- 31
- 1
- 1
- 2
3
votes
1 answer
Trigger notification weekly Swift 3
I am trying to make a schedule, in which I need to remember all the weeks I have class such as Monday at certain time. The problem is that if I assign weekday = 1 (Sunday) when I print the variable triggerWeekly it tells me that weekday = 2, so by…

Diego Salinas Flores
- 61
- 1
- 8
3
votes
1 answer
toLocaleString return unexcepted characher in IE
I expected toLocaleString to return "Monday" (6 character),
but IE returned some unexpected character to me,
how can i get weekday correctly without another extension API (moment.js, etc..)
IE11:
var weekday = new…

Benny Leung
- 133
- 1
- 3
- 10