Questions tagged [dayofweek]

Usually a function that returns day of the week when a certain date object is passed.

Get day of day of the week in:

691 questions
-3
votes
1 answer

Adding bottom border to dates in formula

I am looking to have a formula automate some bottom boarders. The scenario is that I have a schedule that creates weeks which is already formula driven to continue down but wish to automate the month changes where the majority of a week lies in the…
Delsha
  • 1
  • 1
-3
votes
2 answers

Week of month, month of year,year

I would like to check Week of month, month of year and year but I have a problem with week of month here is code: Public Class BMW Public Shared Function GetWeekNumber() As Integer Threading.Thread.Sleep(2000) Dim span As…
Fiínek Cahů
  • 67
  • 1
  • 2
  • 11
-3
votes
2 answers

Number of Mondays between two dates in Java

Can someone suggest the logic to find out the no. of Mondays between two dates in Java? Instead of looping through all the days, is there any other approach to count the no. of occurrences of Mondays between two dates in java
shruthi
  • 21
  • 1
  • 2
-3
votes
3 answers

How to get 'days' like Monday, Tuesday etc on a given input 'date' in java

I'm working on a task where I need to provide specific day like Wednesday, Thursday etc on given input date like Input: 6 7 2017 Output: Wednesday Any help would be appreciated thank you. I have tried using java.util.Calendar. I am able to get…
-3
votes
3 answers

How to open another tab (fragment) if today a specific day?

I am developing an app with fragment tabs, and I want to open another tab, when the activity is started. If today is Monday - open first tab, if today is Tuesday open second tab and etc. How I can do that? My fragmentactivity.java: public class…
-3
votes
2 answers

How to retrieve the current day of the week?

How would I get the current day of the week? Can some please help me?
-4
votes
3 answers

Get last and first day using Java

I have a requirement which is as follows: for example if today is Sunday then I need to get first Sunday and last Sunday in next month, and so on for all days in the week. I need to get the first and last day in next month. Any idea on how I can do…
-4
votes
1 answer

I'm trying to get the date of monday before 1 of actual month

Java don't execute some lines of my code when I use Calendary library. I'm trying to get the date of monday before 1 of actual month. //Today is Tuesday, 2 January of 2019 (29/01/2019) Calendar cp1 =…
Hammerin87
  • 65
  • 1
  • 1
  • 8
-4
votes
1 answer

Finding t[] array in Sakamoto's algorithm to find the day of week

I wanna know how to find how to calculate the values of t[] array in this algorithm? int dow(int y, int m, int d) { static int t[] = {0, 3, 2, 5, 0, 3, 5, 1, 4, 6, 2, 4}; y -= m < 3; return (y + y/4 -…
Sudeep
  • 23
  • 4
-5
votes
2 answers

How do I output the date of all Mondays this year?

I'm trying to output the dates of all Mondays this year, but my if element won't work with the conditions I'm giving it. This is my code: static void Main(string[] args) { var dagEtt = new DateTime(DateTime.Now.Year, 1, 1); while (dagEtt <=…
Labbis
  • 19
-5
votes
1 answer

C# Get Day Of The Week

I am writing a text to speech program in C#, and have gotten the time information with the following code: else if (e.KeyCode == Keys.Enter && InputTextbox.Text == "what time is it") { OutputTextbox.Text = "The time is " +…
The Woo
  • 17,809
  • 26
  • 57
  • 71
-6
votes
1 answer

Get days of a week, by a day of the month

I've been looking arround on stackoverflow, and i couldn't find how can i do the following problem on C#. I need a method that i'll send a int (day of the month), it always return de days of the month from monday to friday of the week the day…
Willdune
  • 13
  • 3
-6
votes
1 answer

How to find out the date of the first day of week from the week number in C++

Need a C++ function to find out the date of the first day of week from the week number. Input : year and week number Output : date [It should be 1st day of that week number] e.g : inputs : year – 2017, week number – 8 Output: 20th Feb…
user2991556
  • 115
  • 1
  • 10
-8
votes
1 answer

Data Structure for keeping time and day of the week PHP

How can I hold in a data structure in PHP only the time of the day and the day of the week? E.g.: 17:20 Sunday Also I need to add minutes and hours to it. E.g.: 22:03 Sunday + 03:00 = 01:03 Monday
Radu Stanescu
  • 37
  • 1
  • 3
  • 10
-9
votes
2 answers

Giving wrong day of week in PHP

It is displaying Thursday but Wednesday output, please help me fix it......... My code Thanks in…
vinod
  • 45
  • 13
1 2 3
45
46