Post Reply 
N° of the week from a date
11-01-2015, 06:15 PM
Post: #1
N° of the week from a date
HI,

Here is an another little, sometime usefull to know in which week will occur an evenement. Th formulae is :

N° week= IP[DOW(1/1/YYYY)+DOY(JJ,MMYYYY)+5]/7 - [IP(DOW(1/1/YYYY)/5].

Code:

LBL'NUW'
XEQ'001'
WDAY
STO I
x<>Z
XEQ'001'
[delta]DAYS
+/-
INC X
RCL I
+
5
+
7
/
IP
RCL I
5
/
IP
-
RTN
LBL'001'
ENTER
YEAR
#001
#001
[->]DATE
RTN
END

It is according to ISO 8601, so for old calendars the result may vari +/- 1 week.

17/04/1982----> 15 (week 15)
30/06/1950----> 26 (week 26)

Gérard.

Gérard.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
N° of the week from a date - ggauny@live.fr - 11-01-2015 06:15 PM
RE: N° of the week from a date - Dieter - 11-02-2015, 10:03 PM
RE: N° of the week from a date - Dieter - 11-03-2015, 07:59 PM
RE: N° of the week from a date - Dieter - 11-06-2015, 07:01 AM
RE: N° of the week from a date - Dieter - 11-06-2015, 08:10 PM
RE: N° of the week from a date - fhub - 11-10-2015, 02:35 PM
RE: N° of the week from a date - walter b - 11-10-2015, 10:02 PM
RE: N° of the week from a date - walter b - 11-11-2015, 07:56 AM
RE: N° of the week from a date - d b - 11-11-2015, 04:00 PM



User(s) browsing this thread: 1 Guest(s)