Title: | Microsoft Visual Basic |
Moderator: | TAMARA::DFEDOR::fedor |
Created: | Thu May 02 1991 |
Last Modified: | Thu Jun 05 1997 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 2565 |
Total number of notes: | 10453 |
Hi there, I'm using the DatePart function to return a week number from a date specified by a user. This works fine for years starting 1st Jan (default). How / where do I define the 'firstweekofyear' value within the application if I want to use 1st July as the first week of the year ? Thanks in advance. Michael
T.R | Title | User | Personal Name | Date | Lines |
---|---|---|---|---|---|
2558.1 | DSC000::CWINPENNY | Thu May 15 1997 06:23 | 8 | ||
Seeing as how you can retrieve the week number for your own first week of the year and the actual week number it doesn't sound too difficult to determine your virtual week number. These days programmers are just too lazy. Chris | |||||
2558.2 | is this it? | XSTACY::PATTISON | A rolling stone gets the worm | Thu May 15 1997 06:29 | 6 |
How about: DatePart("ww", dateadd("m", -6, dtValue)) Dave | |||||
2558.3 | Defining 'firstweekofyear' ? | BVOSV1::64566::M_DOHERTY | OO & CORBA Compliant | Thu May 15 1997 14:35 | 17 |
RE: .1 No, it ain't difficult at all but since the doc. indicates you can specify it, I'm interested in knowing how to set the 'firstweekofyear' value. RE: .2 Thanks for the response. That's similar to a workaround I've already implemented. Any pointers on setting the 'firstweekofyear' value ? Cheers, Michael |