<html>
<head>
<base href="https://bugs.documentfoundation.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - EDITING: Copy and paste a cell changes the content from '27-Jul-93' to '27-Jul-89'"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=135826#c6">Comment # 6</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - EDITING: Copy and paste a cell changes the content from '27-Jul-93' to '27-Jul-89'"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=135826">bug 135826</a>
from <span class="vcard"><a class="email" href="mailto:erack@redhat.com" title="Eike Rathke <erack@redhat.com>"> <span class="fn">Eike Rathke</span></a>
</span></b>
<pre>Yes, the attached source document has Nulldate 1904-01-01 while a new target
document has Nulldate 1899-12-31, thus 4 years and 1 day difference. As all
calendar dates are just numbers of days since nulldate, copying those numbers
between documents with different nulldates goes awry.
The only solution would be to detect different nulldates and in that case
inspect each and every cell copied whether it is date afflicted (i.e. a date or
date+time number format set) and if so do an adjustment (here +1462 days).
My recommendation for the use case here would be to change the nulldate of the
source document (Tools->Options->Calc->Calculate) to 1899-12-31 (which
temporarily gives wrong dates) and then add 1462 to all date cells in the
affected Date column. To do so enter 1462 in some other cell, copy that to
clipboard, select the Date column range and then Paste-Special (Shift+Ctrl+V)
with the Options Add being activated.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>