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
-1
votes
1 answer

Difference between today,week start

How to get the difference between datetime.datetime.utcnow(), and the start of week? I want start of week of "date=17,month=12,year=2022,hour=x,minute=y,second=z" to be: "date=12,month=12,year=2022,hour=0,minute=0,second=0", where x,y,z are…
Neptotech -vishnu
  • 1,096
  • 8
  • 23
-1
votes
1 answer

How can you get the currentday of the week REACT NATIVE?

I saw a code as reference where it showed the output of the currentTime, currentDay, the date, month, year in react native using extend class Component export default class NowShowing extends Component { constructor() { super(); this.state = {…
randelski
  • 1
  • 2
-1
votes
1 answer

How to extract day of week from timestamp

I am trying to extract the day of the week from a timestamp in SQL Server. I am specifically looking for the SQL Server equivalent syntax to EXTRACT. I want to count how many fields are in each day of the week. This is how I would do it on…
Rivky
  • 1
  • 1
-1
votes
5 answers

How to get next Friday 13th since the given LocalDate

I need to get next Friday 13th since the given date using LocalDate. How it could be implemented?
ferenaj
  • 19
  • 1
-1
votes
1 answer

How to add weekdays with year and month in pandas

I am trying to do create a column that has a year, month, weekdays in the dateformat like 2020-10-Thu or 2020-10-04 but tha both data will be in date format ther is any way to do that thing
Noman
  • 135
  • 1
  • 6
-1
votes
1 answer

How to get week of month from given date

How to get weekOfMonth value from given date. Today "2021-19-12" Dec 19th come under 4th week But passing any date value, how to get week number specific to date month.
kiran
  • 4,285
  • 7
  • 53
  • 98
-1
votes
1 answer

Don't know how to use LocalDate

I'm studying java and I need to do a code with this: Create a constructor, and if the date is monday, the variable total will have 10% of discount. But I'm getting error when I put a date in my main, and have no idea how create this boolean of local…
-1
votes
3 answers

How to find the day of week (Monday, tuesday etc.) of the first day of a month in Java?

How to find, let's say, what day of the week is June 1st in Java?
drugsrbad
  • 19
  • 2
  • 4
-1
votes
1 answer

Timing for iSeries DB2 SYSIBM/SYSDUMMY1 updates

I have a simple query to pull DAYOFWEEK from SYSIBM/SYSDUMMY1 to determine whether or not to clear a table that tracks yesterday sales. DELETE FROM DAILYSALES WHERE (CASE WHEN (SELECT DAYOFWEEK(CURRENT DATE) FROM SYSIBM/SYSDUMMY1) …
Nancy Wilson
  • 9
  • 1
  • 3
-1
votes
1 answer

MYSQL How to get the start and end date of a week?

After I do query, I already got the year, month, and week after grouping them using YEAR(),MONTH() and WEEK() functions. But, I lost somewhere to display the start date and end date from the…
Afif Zuhair
  • 53
  • 1
  • 10
-1
votes
2 answers

How to get the day of the week using enumeration

I already have the code but the the day of the week doesn't match up. The second input is a bit off. This is julian day formula i think. enum Day { MON, TUE, WED, THU, FRI, SAT, SUN; } public Day dayOfTheWeek() { int D = day, M = month, Y =…
Johny
  • 55
  • 11
-1
votes
3 answers

Simple date format day of week displays same day

I'm having issues with the below code displays Thursday as the dayOfTheWeek regardless of the date. Any ideas where I've gone wrong with this? public void CreatePlan() { editPlanName = findViewById(R.id.editPlanName); String plan_name =…
-1
votes
1 answer

How to UPDATE with SELECT WEEK() in same table, more than 1 row [mysql]

This is my code UPDATE ks_tidy SET announcedWeek = ( SELECT week(dateAnnounced) as weekAnnounced FROM ks_tidy ) WHERE announcedWeek = '' and the problem I'm running into is it doesn't work when I'm trying to update more than 1 row? 1242 -…
keymistress
  • 138
  • 9
-1
votes
1 answer

BigQuery, Sum by week

I am using standard SQL and am trying to add the weekly sum for product usage by week. Using code below, I was able to add to each row the respective week and year it falls into. How would I go about summing the totals for an item by week and…
zstar
  • 47
  • 1
  • 7
-1
votes
1 answer

Looking for a function that gives me all weekdays (monday, tuesday...) based on a variable "year"

As the title says I'm looking for a function in SQL-Server to retrieve all weekdays, based on a variable set as a year. I know there should be two useful functions for this case, but I don't know how to use them properly nor I am good at writing…
Akr0n
  • 13
  • 1
  • 6