William Case wrote:
Hi Andreas;
Are you a contributor or moderator for this OOo user list?
Well, I try to contribute.
I ask, not to pry, but because I think I have found a basic problem with
dating in OOo - Calc at least.
> As you suggested I created a test sheet. My first entry was A1=N(0)
formatted NN MMM D YY. A1 at first showed Sat Dec 30, 99. Then a few
seconds later when Calc auto-saved. A1 then showed Fri Dec 29, 99. A1
remained equal to =N(0).
To test it, I deleted the A1 value and re-entered it, =N(0) and got Sat
Dec 30, 99 back. I immediately used F9 to recalculate and got no
change. I then waited for the automatic save and A1 changed again to
Fri Dec 29, 99.
This is weird. I can't reproduce this behaviour using =N(0) and
auto-save with official build OOo2.0.2 on SuSE9.x.
Why not put a plain constant zero into $A$1 ?
I appreciate your sharing your formulae, but WEEKS() seems neater and
cleaner and has the advantage of being built in, if only I could be
certain that the Type in WEEKS(Start Date; End Date; Type) meant what I
think it means.
Well, you need to be shure what it does:
Put this into a test-sheet:
A1: =TODAY() [or any other start-date]
A2: =A1+1
B1: =WEEKS($A$1;$A1;0)
C1: =FLOOR($A1-$A$1;7)/7
D1: =WEEKS($A$1;$A1;1)
E1: =FLOOR($A1-$A$1+WEEKDAY($A$1;3);7)/7)
[WEEKDAY(Dt;3) starts with Monday=0)]
Copy down B1:E1 to row B2:E2, then copy down row 2 to a few dozends of rows.
Change A1 (add/substract some number of days)
Format A, so it shows a weekday, for instance YYYY-MM-DD NN
WEEK(Dt;0) gives count of complete weeks since start, WEEK(Dt;1) seems
to start counting at next Monday.
I re-entered the A1 =N(0) value and proceeded to input your suggested
table. I set B1 to TODAY(). Row 1 values were 0; row 2 values were all
5563 (number of weeks from the turn of the last century to today). No
change was detected in these numbers during auto-save. But then they
shouldn't reflect a fraction of a week.
Your may use another table, but I used =WEEKS($A$1;$A1;0) in B1.
A has formatted numbers, increasing by one.
B has the 0-variant of WEEKS(thisDate-firstDate; 0), starting at 0
C simulates B
D has the 1-variant of WEEKS(thisDate-firstDate; 1), starting at 0
E simulates D
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]