LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-20-2006, 05:13 PM   #1
nadroj
Senior Member
 
Registered: Jan 2005
Location: Canada
Distribution: ubuntu
Posts: 2,539

Rep: Reputation: 60
determine dates in a given week - VB.Net


ill cut to the chase.

given a week of year (ie this week, 33/52) how can i determine the days in that week? for this week, the days would be monday 14th through sunday 20th.

i havent looked extensively, but ive looked. i can do the opposite, ie determine the week of the year given a date.

thanks for any tips

edit: ok i discovered a way.

Code:
Dim a As New Date(Now.Year, 1, 2)
a = a.AddDays(weekNumber * 7)
'a' is now a Date object representing the first day of week 'weekNumber'.

Last edited by nadroj; 08-20-2006 at 08:13 PM.
 
Old 08-22-2006, 02:05 AM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
And a response to stop it from auto-bumping ;}
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Difference between two dates Uday123 Programming 5 02-23-2009 06:26 AM
About Dump Dates anilbh Linux - Newbie 7 03-08-2006 01:33 AM
Subtracting the day of two dates and recieving an integer answer(VB.NET) mrobertson Programming 1 08-15-2005 01:46 PM
Dates in PL/PGSQL anisbet Linux - General 0 11-19-2001 10:16 AM
dates on threads.... acid_kewpie LQ Suggestions & Feedback 1 10-26-2001 12:41 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration