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
2 answers

Week End Logic is giving 53 weeks

I am trying to create week End for all weeks my logic is dateadd(day, 7-datepart(Weekday, basicstart), basicstart) It is generating Week End As '4-Jan-2014' for last week of 2013 means 29-Dec-2013 to 31-Dec-2013 but it is not merging data for…
0
votes
1 answer

How to know a week of determinated date in months - ASP MVC 4

I'm working in ASP using MVC 4, and i try to know the number of week in month. For example, the user inserts 05/02/2014, and i in controller needs to know the number of week from this date. For example: The user insert 04/02/2014 and i gets result…
CesarMiguel
  • 3,756
  • 4
  • 24
  • 34
0
votes
3 answers

Mysql Get week of lifetime

WEEK() or WEEKOFYEAR() return week of the year. But if I want to GROUP BY week, with time range spanning over years, then the GROUP BY WEEK() wont work. Since WEEK will return same values for, lets say, January 3, 2010 and January 3, 2011. How to…
Aqeel Ashiq
  • 1,988
  • 5
  • 24
  • 57
0
votes
2 answers

Return number of weeks in Postgres

This is what I am using right now and it returns the number of days between beginDate and endDate date( ' $(@endDate)') - date('$(@beginDate)') as weekNumber How can I get it to return the number of weeks between the two?
0
votes
2 answers

Get the curent week of a month

I need a php code which return the current week of the day in a month. Eg: today is 03 / 12/ 2013 , which is first week of this month if the date becomes 10 / 12 / 2013, then the day is in second week of this month. I need the php code which retur…
tibin mathew
  • 2,058
  • 10
  • 41
  • 51
0
votes
1 answer

Get correct calendar week (1 or 53???) CUI

I need an right calendarweek for my application. This is my try: DateTime d = new DateTime(2013,12,31); CultureInfo CUI = CultureInfo.CurrentCulture; Label1.Text = CUI.Calendar.GetWeekOfYear(d, CUI.DateTimeFormat.CalendarWeekRule,…
Butters
  • 977
  • 5
  • 14
  • 25
0
votes
2 answers

Jquery flot and week numbers

I made a page to plot average snowdepth by week number. Now that we entered 2010, week 1 my graph stretches the interval on the x-axis (yearweek). What I want is the weeknumber on the x-axis (51,52,1,2 etc), and a fixed intervalwidth. Anyone know…
Mark Henry
  • 2,649
  • 7
  • 40
  • 48
0
votes
1 answer

MySQL LEFT JOIN SUM doen not include 0

Guess there are many varianat of this question, however this has a twist. My primary table contains logged kilometers for certain dates for certain users: Table km_run: |entry|mnumber|dato |km | where 'dato' is the specific date. Formats are…
kWalk
  • 9
  • 3
0
votes
1 answer

show weeks_ago based off week number?

Im trying to show the number of weeks ago calculated from the week number " x weeks ago " this should just increment one week ago, two weeks ago, three weeks ago, 1 month ago, 2 months ago, 1 year ago.. etc Im using method helper: def…
Rubytastic
  • 15,001
  • 18
  • 87
  • 175
0
votes
2 answers

CenOS shows incorrect week number

I'm using php date('W'); function to get a number of the week of this year. date('W') says "40" (that's correct). The problem is, that my Linux machine, CentOS has a correct date, but shows incorrect week number. date +"%W" says "39" Does anyone…
jomajo
  • 37
  • 3
  • 10
0
votes
0 answers

"Error! Object Expected" in calendar on html page

I'm in the process of writing a html page with links to microsoft access to show and edit databases (a bit of context for everyone). I want to be able to have a textbox so that when the user inputs the date, the week number of the year…
0
votes
1 answer

How to get week start dates and week number of each week in a year considering start day of the week is Monday in python?

How can I get week start dates of each week in a year, considering start day of the week is Monday in python? This assumes start day is Sunday: >>>import datetime as datetime >>>dt = datetime .date(2013,12,30) >>>dt.isocalendar()[1] 1 However,…
alwbtc
  • 28,057
  • 62
  • 134
  • 188
0
votes
2 answers

Create URL based on Year and week number like "2013-W32.html"

i would like to create a url based on the year and the week number in order to redirect to a document which the name changes every week : the document is stored at this place : server.com/kw38_2013.pdf (which kw38 mean week 38) Does someone know a…
0
votes
0 answers

android: 08/29 and 08/30 different week_of_year?

if i try to get the actual week of year like this: Calendar cal = Calendar.getInstance(); actualWeek = cal.get(Calendar.WEEK_OF_YEAR); i get 35 for actualWeek but for cal.set(2013, 7, 30); int week = cal.get(Calendar.WEEK_OF_YEAR); i get 40 and 42…
ntm
  • 731
  • 2
  • 13
  • 37
0
votes
2 answers

Rails: Activity log by week - filling in blank weeks

I'm creating an activity chart, showing the number of records saved to a user's profile over time (in this case its 'user.notes' i.e. user has_many notes). The json output from the function below feeds nicely into a chart library. The function below…
christian
  • 807
  • 1
  • 11
  • 19