Click here to Skip to main content
15,920,111 members
Home / Discussions / Database
   

Database

 
GeneralRe: Sqlite (Max Value) Pin
jashimu3-Dec-09 5:49
jashimu3-Dec-09 5:49 
GeneralRe: Sqlite (Max Value) Pin
dan!sh 3-Dec-09 6:03
professional dan!sh 3-Dec-09 6:03 
GeneralRe: Sqlite (Max Value) Pin
Mycroft Holmes3-Dec-09 14:03
professionalMycroft Holmes3-Dec-09 14:03 
QuestionHow to get currect number of weeks for the given date considering when 31st december is saturday Pin
chakran2-Dec-09 20:06
chakran2-Dec-09 20:06 
AnswerRe: How to get currect number of weeks for the given date considering when 31st december is saturday Pin
WoutL2-Dec-09 21:56
WoutL2-Dec-09 21:56 
GeneralRe: How to get currect number of weeks for the given date considering when 31st december is saturday Pin
chakran2-Dec-09 22:01
chakran2-Dec-09 22:01 
GeneralRe: How to get currect number of weeks for the given date considering when 31st december is saturday Pin
WoutL2-Dec-09 23:36
WoutL2-Dec-09 23:36 
AnswerRe: How to get currect number of weeks for the given date considering when 31st december is saturday PinPopular
David Skelly2-Dec-09 22:49
David Skelly2-Dec-09 22:49 
It's because contrary to popular belief, there are not 52 weeks in a year. There are 52 weeks and one spare day left over. So, if you just assume 52 weeks every year, eventually your calculation gets out of line. That's why financial years occasionally have a week 53 to stop things from drifting off.

Basically about 1 year in every 5 or 6 has 53 weeks. It's not a straight 1 in 7 because leap years throw it out (every fourth year has 52 weeks and 2 days left over which makes the calculation trickier). There is an ISO standard which defines it. 2004 had 53 weeks, 2009 has 53 weeks, 2010 has 52, the next 53 week year will be 2015.

Basically, if 1st Jan is a Thursday (or if it is a leap year either a Wednesday or a Thursday) then there are 53 weeks in the year.

For what you want, you might be able to calculate the number of days from a base date and then divide by 7. It might be easier than trying to work out weeks per year. Does that give the right answer?
GeneralRe: How to get currect number of weeks for the given date considering when 31st december is saturday Pin
Mycroft Holmes3-Dec-09 14:00
professionalMycroft Holmes3-Dec-09 14:00 
QuestionNewbie question Pin
NAB372-Dec-09 8:48
NAB372-Dec-09 8:48 
AnswerDid you see my response in the VB.NET forum ? Pin
David Mujica2-Dec-09 9:05
David Mujica2-Dec-09 9:05 
GeneralRe: Did you see my response in the VB.NET forum ? Pin
NAB372-Dec-09 15:24
NAB372-Dec-09 15:24 
AnswerRe: Newbie question Pin
Blue_Boy2-Dec-09 9:21
Blue_Boy2-Dec-09 9:21 
QuestionImport Export Wizard problem Pin
RajpootRohan1-Dec-09 23:03
professionalRajpootRohan1-Dec-09 23:03 
AnswerRe: Import Export Wizard problem Pin
Corporal Agarn2-Dec-09 1:24
professionalCorporal Agarn2-Dec-09 1:24 
AnswerRe: Import Export Wizard problem Pin
Mycroft Holmes2-Dec-09 12:16
professionalMycroft Holmes2-Dec-09 12:16 
AnswerRe: Import Export Wizard problem Pin
Robin_Roy2-Dec-09 19:01
Robin_Roy2-Dec-09 19:01 
QuestionEscape character for hyphen in SQL Pin
hvgyufg28fh38tyr78hf1-Dec-09 20:44
hvgyufg28fh38tyr78hf1-Dec-09 20:44 
AnswerRe: Escape character for hyphen in SQL Pin
Niladri_Biswas1-Dec-09 21:44
Niladri_Biswas1-Dec-09 21:44 
QuestionReturn value from a stored procedure Pin
Member 42602701-Dec-09 19:45
Member 42602701-Dec-09 19:45 
AnswerRe: Return value from a stored procedure Pin
_Damian S_1-Dec-09 19:58
professional_Damian S_1-Dec-09 19:58 
GeneralRe: Return value from a stored procedure Pin
Member 42602701-Dec-09 20:37
Member 42602701-Dec-09 20:37 
AnswerRe: Return value from a stored procedure Pin
Andy_L_J1-Dec-09 20:07
Andy_L_J1-Dec-09 20:07 
Questionsearching problem in SQL server 2005 Pin
hvgyufg28fh38tyr78hf1-Dec-09 18:47
hvgyufg28fh38tyr78hf1-Dec-09 18:47 
AnswerRe: searching problem in SQL server 2005 Pin
_Damian S_1-Dec-09 19:02
professional_Damian S_1-Dec-09 19:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.