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

Show weekdays and times on the x-axis in ggplot

I have a dataset with events. These events have a start time and a duration. I want to create a scatter plot with the start time on the x-axis and the duration on the y-axis, but I want to alter the x-axis so that it displays the course of a week.…
A. Stam
  • 2,148
  • 14
  • 29
2
votes
2 answers

Display tomorrow's name in javascript?

I am trying to output something similar to the following on our ecommerce website: Order by 5pm today for dispatch on Monday Obviously, the word Monday would be replaced by the name of the next day (ideally the next working day i.e. not Saturday or…
dannymcc
  • 3,744
  • 12
  • 52
  • 85
2
votes
3 answers

PLSQL - How to find Monday and Friday of the week of a given date

I have spent days trying to figure this out to no avail, so hopefully someone can help me. I have a queried date set which contains several fields including a column of dates. What I want to do is create a new field in my query that tells what the…
Melanie
  • 23
  • 1
  • 1
  • 5
2
votes
1 answer

iPhone - how may I check if a date is Monday?

I'm trying to find if a date is Monday. To do this I proceed this way : #define kDateAndHourUnitsComponents NSYearCalendarUnit | NSMonthCalendarUnit | NSDayCalendarUnit | NSHourCalendarUnit | NSMinuteCalendarUnit | NSSecondCalendarUnit NSCalendar…
Oliver
  • 23,072
  • 33
  • 138
  • 230
2
votes
1 answer

swift 4 weekday in iso8601

It's 8th of October, 2017, Sunday. var weekday = Calendar(identifier: .iso8601).component(.weekday, from: Date()) weekday is 1, but should be 7. What's the problem?
Anton
  • 339
  • 5
  • 15
2
votes
1 answer

Efficient way to add day indicator variable from date to data frame

I have a big DataFrame with millions of rows and one of the columns as date. I want to add 5 columns to it which are 0/1 for weekdays. dates = pd.date_range('1700-01-01', '2017-07-02') df = pd.DataFrame({'date':dates, 'Values':np.random.normal(size…
Gerry
  • 606
  • 6
  • 16
2
votes
2 answers

How to generate an array of weekdays in Y-m-d format?

The array $weekDays contains 7 days that starts today. 2017-06-01/ 2017-06-02 / 2017-06-03 / 2017-06-04 / 2017-06-05 / 2017-06-06 / 2017-06-07 $weekDays[0] = date('Y-m-d'); for ($i=1; $i<7; $i++){ $weekDays[$i] = date('Y-m-d', strtotime('+' .…
2
votes
1 answer

Can I have custom UILocalNotification repeat intervals (i.e. weekdays only?)

I would like to be able to schedule a UILocalNotification to repeat at the same time every day, but only on weekdays (no Saturdays or Sundays). Is this possible using the repeat interval feature of UILocalNotification, or is my only option to…
2
votes
1 answer

SQLite strftime() weekday

I have been trying with no success to to count how many values were created in a specific week day: SELECT count(*) as count FROM packets WHERE strftime("%w", timeIn) = '1'; I have this values in…
Joe
  • 234
  • 1
  • 10
2
votes
1 answer

H2 DB DAY_OF_WEEK starting Monday

I need to get the day of the week of a date in H2 as a number. There is a function DAY_OF_WEEK(date) which returns Sunday as the first day of the week. However, I need Monday to be the first day of the week. Does someone know a function in H2 to…
maria vill
  • 1,014
  • 1
  • 7
  • 11
2
votes
1 answer

Python datetime weekday strftime() vs weekday()

Have a pandas dataframe df, in order to get weekday from the date column, I did: df_raw['DayOfWeek'] = df_raw[str_date_colname].dt.strftime('%w') It returns weekday as a decimal number, where 0 is Sunday and 6 is Saturday. However, I want to get 0…
Kevin
  • 2,191
  • 9
  • 35
  • 49
2
votes
3 answers

Get weekdays within a month

I'm trying to get the dates within a given month. My plan is to Get the start and the end dates of a given month,. Get all the dates that fall within that range. Iterate through them and eliminate dates that fall within a weekend using the…
Isuru
  • 30,617
  • 60
  • 187
  • 303
2
votes
1 answer

What is the SQL syntax to create a column in my Date Dimension Table that will group the dates into this specific week grouping?

I am using SQL Server 2014 and I have a Date Dimension table (called DateDimension) of which one the columns is a Date column (called Date). This table list all dates from 2000-01-01 till 2017-12-31 Extract of Date Column from DateDimension Table: …
user3115933
  • 4,303
  • 15
  • 54
  • 94
2
votes
2 answers

Linking Simpy simulation time to Python Calendar for week day specific actions

I want to build a simulation model of a production network with SimPy comprising the following features with regard to time: Plants work from Monday to Friday (with two shifts of 8 hours) Heavy trucks drive on all days of the week except…
mondano
  • 827
  • 10
  • 29
2
votes
1 answer

PHP add weekdays not working properly for Friday

I am trying to add weekdays to a date using the below formula: $date = strtotime($effdate." +5 weekdays"); $date = date('m/d/Y', $date); It works fine for other days but not for Friday. It points to the next Sunday rather than Friday. I googled for…
Keerthi
  • 923
  • 6
  • 22