Questions tagged [week-number]

Based on Gregorain calendar, every week of a year has a number from 1 to 52, 53 or 54. Use this tag for instance if you want to calculate the weeknumber from a certain date or vice versa. You also might include the date tag. This tag is independent of programming language.

603 questions
0
votes
1 answer

How to identify default_week_format in MySQL?

How can I identify the default_week_format in MySQL? I would like to know which default week format my server is using? Values can range between 0 and 7.
Peter
  • 1,224
  • 3
  • 16
  • 28
0
votes
0 answers

Tableau Query: Year-end week rolling

In Tableau, I am making a report which shows data according to the current week for 4 weeks in the future. I take a snapshot of the data from SQL Server every week on Monday and upload the result of the query through an Excel file onto Tableau. I…
Shantanu
  • 1
  • 1
0
votes
1 answer

Informatica - Get Date of Monday of a Week number

How to calculate the Monday date of a week using the week number in Informatica?!
Karthic
  • 1
  • 1
0
votes
1 answer

R - week function returns unexpected values

I am looking to find the week within a year in R for a list of dates. However, The outputs are rather weird. See below: week("2000-01-01") week("2000-01-06") week("2000-01-07") week("2000-01-13") week("2000-01-14") This returns 1, 1, 2, 2,…
Trexion Kameha
  • 3,362
  • 10
  • 34
  • 60
0
votes
1 answer

Show week beginning date with week()

I am using the week function like so: SELECT sub.id AS ARID, WEEK(my.data) AS Week, Is it possible to add the week beginning date that the week corresponds to? Something like: SELECT sub.id AS ARID, WEEK(my.data) AS Week, …
Doug Fir
  • 19,971
  • 47
  • 169
  • 299
0
votes
1 answer

Calendar.WEEK_OF_YEAR is returning a wrong value?

I tried getting week of the year through below code but it always returns "3", I even set the timezone to GMT but still returning the same value("3"). Please help me out over here DateFormat formatter = new SimpleDateFormat("dd-mm-yyyy"); Date date…
ayush bagaria
  • 199
  • 1
  • 1
  • 10
0
votes
2 answers

PHP strtotime +1 week error

I have a problem with strtotime and the following code (I want all calendar weaks in the given time range) $all_dates = array(); $tempdate = '2014-01-01'; $enddate = '2015-03-01'; while (strtotime($tempdate) <= strtotime($enddate)) { …
user3356383
  • 13
  • 1
  • 4
0
votes
1 answer

Get weeknumber of today, X weeks back and X Weeks ahead in javascript

I want a javascript function that will give the current weeknumber, then, when it has the weeknumber, get all the weeknumbers from current weeknumber - X and the same with the future, but: The currentweek has to be in the center!…
ErikBrandsma
  • 1,661
  • 2
  • 20
  • 46
0
votes
1 answer

SQL Server 2005 Function Create Temp Table of Date Ranges with Week Number

I have a function that I developed to return the week number of a date passed in from a query; the week numbers are custom to us and not any fixed standard week ranges. The function takes the date passed in and checks it against a range of dates…
Andrew
  • 1,728
  • 8
  • 28
  • 39
0
votes
1 answer

Weeks in month June 2014

Sorry for asking daft question but I cannot get correct number of weeks in June 2014 returned by Calendar: public static void main(String[] args) { Calendar calendar = Calendar.getInstance(); calendar.set(Calendar.DAY_OF_MONTH, 1); …
ruruskyi
  • 2,018
  • 2
  • 26
  • 37
0
votes
1 answer

Get beginning of calendar week from current date() in

I find functions which return the week number for a given date. But instead, I would like to get the date of the first day of the particular calendar week returned. This would either be date() itself, or anything between date()-1 and…
mzurhorst
  • 91
  • 1
  • 9
0
votes
1 answer

Parse Week Dates with Joda-Time?

I need to parse ISO 8601 Week dates into a format that Joda-Time can hopefully work with (eg. use for calculating the days in that week, etc.) I've looked around a bit, but there doesn't seem to be any clear docs on how to do this. A full DateTime…
cdeszaq
  • 30,869
  • 25
  • 117
  • 173
0
votes
1 answer

R cumsum for selected months across multiple years

I would like to compute a Cumulative Sum according to Center Disease Control definition. I have weekly data from 25 District since 2008 to now. Site1 Site2 Site3 Site4 Site5 Site6 Site7 Site8 Site9 2011-45 1 1 1 1 2 …
user3355655
  • 463
  • 3
  • 15
0
votes
0 answers

Editable appointment system

I've been to this site several times before for help which I've managed to solve problems encountered in the past but this time I think I'm going to actually have to ask my own question. I am working on a system in which employees of a small company…
Valeskas
  • 1
  • 3
0
votes
1 answer

Best Practice in Scenario

I am currently trying to accomplish the following: get the Last Weekstamp for the last 6 Months, the following ilustrates how the end result might look like: Month | Weekstamp | 2013-12| 2013-52 | 2014-01| 2014-05 | .... and so on I have a…
gberisha
  • 291
  • 5
  • 17