Getting the week number of a date

Koen_Roggeman
Member Posts: 17
Hello is it possible in a simple way to find out the week number if a given date ?
thx
thx
0
Comments
-
Try DATE2DWY(Date,2)
that should work0 -
having a problem with this one.
Windows returns for 03 january 2005 weeknumber 2
Navision returns for 03 january 2005 weeknumber 1
:shock: :-s
does anybody have a clue?Now, let's see what we can see.
...
Everybody on-line.
...
Looking good!0 -
Wow!
I'm digging in my memories.... I had something like this one time.... A long time ago.... lemme think, think.... THINK!!!!.... T!H!I!N!K!
Nope... sorry... You got a real nice one here!"Real programmers don't comment their code.
If it was hard to write, it should be hard to understand."0 -
According to ISO 8601, 2005-January-03 really does belong to Week No. 1.
It's possible that Windows is using ANSI for determining the Week Nos. what with Microsoft being based in the States and everything...Nelson Alberto0 -
sadly enough the weeknumber functionality
Number := DATE2DWY(TODAY, 2)
returns 1 as week number for 03 january 2005
But this is a system function and that means we cannot change anything about.
Is it possible to redefine this in Windows?Now, let's see what we can see.
...
Everybody on-line.
...
Looking good!0 -
What I meant is that DATE2DWY function is returning the correct value.
1 is the correct Week No. for 03 January 2005.
Where in Windows did you get 2?Nelson Alberto0 -
In Outlook and also i got it in a DLL.
It has a function that returns the weeknumber.Now, let's see what we can see.
...
Everybody on-line.
...
Looking good!0 -
In Outlook 2003 you can define the first week of the year: Starts on Jan 1, First 4-day week, First full week
You find this in Tools -> Options -> Calendar Options.No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)0 -
I don't know about the DLL but Luc is right about Outlook (the only remark is the option already exists in XP and 2000, can't say anything about 97 and previous versions, though).Nelson Alberto0
-
Is M$ going to hear about this?"Real programmers don't comment their code.
If it was hard to write, it should be hard to understand."0 -
I think this is because a difference in calculating the weeknumber between Europe and US: In Europe the week with the first thursday on januari is week 1 (according to DIN1355 specification). In US the week of 1 january is week 1. :? :?0
-
This could explain why my date didn't show up... We had a date on monday in week 12. Should have been week 13..... right....
Lemme give her a call again... But actually... I don't think she will believe it!"Real programmers don't comment their code.
If it was hard to write, it should be hard to understand."0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions