Questions tagged [weekend]

117 questions
71
votes
7 answers

How do I exclude Weekend days in a SQL Server query?

How do I exclude values in a DateTime column that are Saturdays or Sundays? For example, given the following data: date_created '2009-11-26 09:00:00' -- Thursday '2009-11-27 09:00:00' -- Friday '2009-11-28 09:00:00' -- Saturday '2009-11-29…
Andrew
  • 12,991
  • 15
  • 55
  • 85
19
votes
5 answers

Determine if Oracle date is on a weekend?

Is this the best way to determine if an Oracle date is on a weekend? select * from mytable where TO_CHAR (my_date, 'DY', 'NLS_DATE_LANGUAGE=ENGLISH') IN ('SAT', 'SUN');
Marcus Leon
  • 55,199
  • 118
  • 297
  • 429
15
votes
1 answer

PostgreSql: select only weekends

I have a table containing the public holidays id | description | date 1 | Ferragosto and Assunzione | 2012-08-15 00:00:00 2 | Tutti i santi (Ognissanti) | 2012-11-01 00:00:00 ...... I want to select only the holidays…
blue
  • 525
  • 1
  • 8
  • 20
13
votes
4 answers

In Java, get all weekend dates in a given month

I need to find all the weekend dates for a given month and a given year. Eg: For 01(month), 2010(year), the output should be : 2,3,9,10,16,17,23,24,30,31, all weekend dates.
usman
  • 1,947
  • 4
  • 19
  • 19
9
votes
13 answers

Get number of weekdays in a given month

I want to calculate the number of weekdays days in a give month and year. Weekdays means monday to friday. How do i do it ?
Hacker
  • 7,798
  • 19
  • 84
  • 154
9
votes
3 answers

Remove weekend data in a dataframe

As you can see from the dataframe below, RBloomberg returns NAs for weekend dates. I want to remove the entire row if it falls on a weekend. How would I do this? I don't want to use the na.omit as this might remove weekday rows if/when I get an NA…
Thomas Browne
  • 23,824
  • 32
  • 78
  • 121
8
votes
3 answers

Hide weekends on WPF toolkit chart

I am making a small app that plots financial price data and since the finance markets are closed on the weekends, I have no data for those days. By default the chart, found in the new WPF Toolkit, shows a large gap between Friday and following…
Alexandra
  • 4,723
  • 3
  • 26
  • 32
6
votes
7 answers

Python - Push forward weekend values to Monday

I have a dataframe (called df) that looks like this: I'm trying to take all weekend 'Volume' values (the ones where column 'WEEKDAY'=5 (saturday) or 6(sunday)) and sum them to the subsequent monday(WEEKDAY=0). I tried a few things but nothing…
6
votes
4 answers

How to convert date to the closest weekend (Saturday)

I have a data frame with Date in the "%d-%m-%Y" format and have the week number. The dates are weekdays and I want the the Saturday for that week in another column. I had initially check whether the date is a weekday or weekend using function in the…
Ami
  • 197
  • 1
  • 12
6
votes
3 answers

How to get all weekends within a date range in C#

Is there a simple way or framework to get all weekends within a date range in C#? Is it possible to do with LINQ as well?
NoWar
  • 36,338
  • 80
  • 323
  • 498
5
votes
5 answers

Add hours to datetime but exclude weekends and should be between working hours

I am trying to add hours to a date but want the new date to exclude weekends and only be between 9.00 to 17.00. example: first scenario: if my date is 23/02/2012 16:00:00. if I add 4 hours to that my new date should be 24/02/2012 12:00:00 (which…
Zaki
  • 5,540
  • 7
  • 54
  • 91
5
votes
6 answers

java calendar weekend of current week

Java using calendar i want to get date of current weekend, any quick idea
d-man
  • 57,473
  • 85
  • 212
  • 296
5
votes
4 answers

How to check if a certain date is a weekend taking into account the current locale in Java?

I'm writing a program in Java and I need to determine whether a certain date is weekend or not. However, I need to take into account that in various countries weekends fall on different days, e.g. in Israel it's Friday and Saturday wheras in some…
Bartek
  • 1,327
  • 1
  • 11
  • 22
5
votes
1 answer

Only Select Friday and coming Monday in mysql

I have assignment on my hand of building an Attendance system which I am doing all right but I am stuck at one place. When counting the leaves, if a person takes a leave on Friday and then take leave again on Monday, then the in between Saturday and…
awatan
  • 1,182
  • 15
  • 33
4
votes
5 answers

Count days between two dates, excluding weekends (MySQL only)

I need to calculate the difference (in days) between two dates in MySQL excluding weekends (Saturday and Sunday). That is, the difference in days minus the number of Saturday and Sunday in between. At the moment, I simply count the days…
lorenzo-s
  • 16,603
  • 15
  • 54
  • 86
1
2 3 4 5 6 7 8