Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Number Of The Week Of The Current Year?


Hello, does anyone knows a easy way to get the number of the week of the current year?

btw, this would be to use in a vbscript if that matters in the case




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
How To Find The Current Year And Week In Sql?
Hi,
I have a Serial No which has a length as 14.For eg IL010730123456. IL01 is The Default Code. 07 is the current year and 30 is the week of the year. 123456 is Serial. How shoud I find The Year and week with the help of this serial no ie The First day of the 30th week of 2007.Is it Possible?

Plz Help me with an Sample Code .
Thanks.....

Calculating A Date From Week Number & Year
I need to be able to calculate the date of every Monday depending on what week number/year it is.

For example is it possible to calculate the date (e.g. 20/10/2003) of a given day (e.g. Monday) when you only know the week number (e.g. 43) and the year (e.g. 2003)

If anyone can point me in the right direction, your help would be greatly appreciated.

Many thanks in advance

Jon

Compair A Number With The Week Of Year Of A Certain Date
Hello,

i want to check of a number is lower then the week of the year of the current date.
How do you do this?

How To Convert Week Number (1-52) For A Specific Year To A Month-day Format
I need to convert a week number for a specific year to a month-day format, specifically the first day of that week. For example, for the year 2001, week 5 would be January 28. Any ideas?

Week Of Year For A Custom Fiscal Year
I’m trying create a function to get the “percentage of Fiscal Year elapsed” for a fiscal year that started and ends on 10/1/05 and 9/30/06 respectively.

How do I determine: Format "ww" returns week of year (1-53) for a year that starts and ends September and August respectively.

Thanks in advance


Week Of Year
Hi, I want to display the week of the year numerically (i.e. 1 to 52 (or 53 having looked at a few forums)) firstly when the screen first displays, using todays date and subsequently when a user picks a date from the calendar dialog.

Could someone please explain in simple terms. I want the first week of the year, number 1, to be the first monday in January and subesquent week numbers calculated from that, is it possible

How Do You Get The Week Of The Year?
How do you get the week of the year?

Week Of The Year
can anyone tell me.....
how can i get the current week of the year?
i mean, for example, 52 weeks in a year, this week is 13 of 52 week

thank you very much!

Find Week Start Date From The Week Number
Does anyone know a way to find the start of the week from a given week number?

For example we are in week 32 this year and the start date is 2/08/04.

I have used the following to find the week number:


Code:
Private Sub getWeekNumber()
'This fantastic bit of code returns the week number

Dim iNumberOfTheWeek As Integer

iNumberOfTheWeek = DatePart("ww", Now())

End Sub

But now I want to find the date range that any given week covers.

Any ideas?

Determining Week Of Year
Hi,

The DTP control appears not to have a property for week of year! Am I missing something??

Best regards,
AstroTux.

How To Get The Week No In A Year Given The Date
i would like to know , what functions that need to be used in order to get the week no in a year given the date..

i tried using the week(date) function but it does not seem to work..is there any other way i can solve this problem..tahnk you..

regards pragash..

Display Week In Year
hello,

i want to dispaly week of the year for example this week is 16th week of
2005 can any one help how to get that in visual basic or in crystal report 4

regards

p rao



--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.296 / Virus Database: 266.8.4 - Release Date: 3/27/2005

Retrieving First Day Of Week For A Whole Year
Does anyone know how to retrieve the first day of the week for all 52 weeks in a year?

Thanks,
Jeff

Determine Date Out Of Week And Year
Hi,

Is there a function, or is it difficult to make a function, that receives 3 parameters (weeknumber, year and day) and determines the date belonging to that day. For example I want to know what date the friday in week 23 in 2003 will be. I pass these parameters to the function and it returns: "June 30".

Does anyone has suggestions an making such a thing?

Finding Out The Year Week From Date
Hi,
I'm trying to find out in which week of the year is a given date
and the week's first Monday's date

thanx

Week From Date (Financial Year)
Hi Guys.

Im trying to run a peice of code to do the following

Get the week number from a cell where 31/03/XX is the first day of the year.

And only goes up to 52 weeks then resets back to week 1 on the 53'rd week.

ANy help would be much obliged.

Al



Edited by - Big Al Inc on 5/8/2007 7:56:42 AM

Week Number And Week Ending Date In VB 6
Hi,
I'm trying to get the system's week number and its week ending date using the VB FORMAT function. For the week number is pretty simple and it works fine but its week ending date I can't find the function. It has to be a function for this instead of codes.

For my week number is this:


test1 = format (date, "ww") 'it gives me the current week number (numbers from 1 to 52)


Now from that week number I would like to get the week date ending, eg.

for week 19 its ending date would be 05/10/2003 (Saturday May 10, 2003)


Any ideas?


Thank you

Olivia

Find Monday Giving Year/week
Hi to everyone.

I have to show the date of the Monday of a given week of the year:

Example:
FindMonday(30, 2003) = "21/07/03".

Does anybody suggest me how should by the function "FindMonday" made?

Thank you for the answer.

Date Of First Day Of The Week From A Week Number
Does anyone know of a way to get the date for the first or last (It really doesn't matter) day a week given a week number?
I'm calculating the week number by using:


VB Code:
lcurrentweek = format(Now, "ww")lcurrentweek + 1...lcurrentweek + 9 'Then i'd like to find the first or last day of each of those  


I guess since I'm just trying to get the first dates of the next nine weeks that i could just find the first date of this week and keep adding seven too it?

Thanks
Andy

Current Year
Hi,

How can I display the current Year only in a cell.
The Date System displays full Date, I only need the current Year.

Regards,
Feroz

Getting Current Week *RESOLVED*
Hey everyone. I trying to get the current week but I'm stuck now. Here is what I have so far.



VB Code:
Dim dTheDate As Date  Dim nWeek As IntegerDim dStartDate As DateDim lDays As LongDim lWeek As Long  TheDate = DatedStartDate = "01/01/" & Year(Date)nWeek = DatePart("ww", dTheDate)lDays = lWeek * 7MsgBox dStartDate + lDays


So it returns 18 and I try multiplying 7 to get the total days since 01/01/2003 and then add that to 01/01/2003 but I keep getting 05/07/2003. If someone can help me I would greatly appreciate it.

Determining Current Week
Is there an easy way to determine on what Day a specific week starts and ends on. eg, I have an application that contains the week #, I want to display on the Screen Week 14 - 04/01/2002 - 04/07/2002.

How Do I Find That The Current Day(15) Comes Under 2nd Week...
Hi Guys,

how do I get which week is the current day.
i.e. 15th of Oct is falls under 2nd week. I want the no 2
to be the output.
Is there any code for that ?

Thanks
Premal

Get Current Month And Year
Ok, this is a simple coding problem and I am sure that a few amateurs out there know this one. The problem is that I don't have the resources here to do the research. I need to know the Date function to return only the current month. and also to return only the current year. I have two drop down boxes, one with a list of the months (January, February...) and a list of the years ranging from 1999-2020. i want to cause automatic selection of these with the current month and year. these combo boxes in result will filter out certain records from a database and display them in a flexgrid that i have on the form. i am sure i would be able to do it with a little bit of code, but i was hoping that there might be a quick already written function. i just didn't want to reinvent the wheel

thanx for any help you can offer

Getting Current Day Month Year
I need to get the current day month and year
I tried the following: -

day = Day (Date)
month = Month (Date)
year = Year (Date)

this works but i need it in the form dd for date, mm for month and yy for year

for example today is the 17/07/03
I want day to equal 17
month to equal 07
and year to equal 03

in the code above
Day(Date) = 17
Month(Date) = 7 'should be 07
Year(Date) = 2003 'should be 03

Any ideas??

Cheers Eb

Checking For The Current Year
I have the variable 'a' with a value of 37345, how could I check that variable to see if it is the same year as the current year. 'a' is dynamic so '37345' can't be hard coded.

Thanks

Test If A Date Is In The Current Week
I'm trying to make a little function that checks if the date in the database is in the current week and then if it is, I could add the entry on a listview.

Here's a concrete example of what I'm trying to do:
Let's say an entry has the date May 8th 2007. I want to test if Now is in the same week as the entry. (Now could be a date from May 8th to May 12th (can't go in the past naturally)).

Weeks start on monday too.

I've tried a lot of things to make it works, but I still didn't succeed, that's why I'm asking you guys...

If someone could help me with this I would really appreciate it.

Thanks in advance.

Current Year/default Value For Combo Box ?
i have a combo box where the user chooses a year

i would like to have the choices start ten years prior to and run through the current year
i would also like the default value when the prog loads to be the current year.

i know the Date() command returns the system date in the format listed the the system properties. (right?)

but how do i know what the sytem time settings are so can extract just the year from it?

and how do i set the default to the current year? do i have to loop through the items in the combo and compare them the the current year that i found above? and what .something attribute do i set for this as far as i can tell, there is no .default setting that i can utilize....

Displaying Current Year In Drop Down List
Hi All,

pls tell me how to select current year by default in a drop down list (combo) which contains a lst of years.

Thanks in advance!

Binish

Week Number
How can I retrieve the week number of the current date using VB6?

Getting Number Of The Week
I have a date in a labelbox like:

label1 = date

Now I can put automatic the month like:
label2 = month(date)

I also want to put the number of the week from that month and I have no clue, any idea?

How Can I Get The NUMBER Of Day Of Week?
Hello everybody!

to get a day of week - no problem:

VB Code:
strDate = Format(Date, "dddd", vbMonday)

But how can I get the NUMBER of day of week, for example in this case: WEDNESDAY = 3
i.e. how can I get "3" with function Format?
And could you be so kind to inform me - where it is possible to look all probable parameters (dd, ww, yyyy...), There are not not much listed parameters in help

best regards
Baloo

Week Number
Does it exist a function that returns the week number for a given date?

Thanks in advance.
Rgds.

Week Number
How to determine the week number is the current month ?
I'd like to know for example if this week is the first, second, third... of the current month?

Thanks for your help )

Week Number
Can someone please give me the syntax to get the current week number IRRESPECTIVE OF LOCAL SETTINGS. Going up the wall on such a simple question.

Need The Week Number.
I need to be able to know what week of the year it is. Also the prog I'm working on operates on "block" weeks. I was told "this is how it's always been done" I'm sure you can relate. Basically. If its week 1 that's fine. If it's week 2 the it's block week 1. If it's week 4 the it's block week 3. Confused yet. I basically need to know the week number but it must be the odd numbered week.

Thanks

Dave


There are 10 types of people in the world: those who understand binary, and those who don't.



Edited by - dcb007 on 2/1/2007 7:52:08 AM

How Do I Get The Week Number ?
hello,

are there functions that would give you a week number from a given date ?
thank you for any help.

Tran.

Week Number Command
What is the command to get the number of week in visual basic

Week Number Of Month
Hi,

Can anybody tell me how I could get the number of weeks in a month, starting from day 1 of the month with Friday as the weekend?

Thanks

How To Find Week Number?
I am trying to calculate the week number of a given date. I am using:


Code:
=ROUNDDOWN((K3-L2)/7,0)
where k3 is the date in question
and L2 is a cell with the first day of the year (eg 01/01/2004)

This works, but what I would really like is some way of generating the value in L2 automatically.
So, the problem is this, how can I automatically return a date that represents the first of january of the current year, without using VBA?

Any ideas?

Finding The Week Number
I'm trying to find a way to find out what number in the year a certain week is.

For example this week (beginning - 26th July) is week 31 this year.

I don't want to get into writing a whole load of code to calculate the number of weeks up to a certain point.

Does anyone know of a simple way to do this?

Number Of Week In A Month
Hi!

Is there a function that would tell the number of a week within a month? Or number of days in a month?

I need to tell whether the specific weekday is the first, second,.. or last in a specific month.

Any ideas?

Bostjan

Week/month Number
how do you get the week number and month number from the system

Caliculate Week Number VB 6.0
Hi,
How can we caliculate the week number in month (based on uk zone) in vb?
For example today date is 08/12/2006.
In which week we are now?1st or 2nd
Any idea thanks

Week Number Of Month
Hi,

Can anybody tell me how I could get the number of weeks in a month, starting from day 1 of the month with Friday as the weekend?

Thanks

Week Number --> Date?!
What I wish to do is this:
User selects a week number, and a combobox is filled with the dates (monday through sunday) corresponding to the specific week. For example the user selects week 43, and the combo contains this:
Monday 21-10-2002
Tuesday 22-10-2002
...etc...etc
Sunday 27-10-2002

Any suggestions?

(I live in Denmark, and therefore the first day of the week is vbMonday)

Week Number Question...
Does anyone know how to accurately calculate evey calendar week number of a given year (with the week starting on a Sunday)? I have tried multiple solutions but none have been 100% perfect i.e. it calculates some years as having a week 53.

Many thanks

Getting A Date From A Week Number
Is there a function in VB to return Month/day from a week number - where current year is also entered ?

Copyright 2005-08 www.BigResource.com, All rights reserved