Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

calculating date as "days since ..." to use as appropriate number in excel

7 views
Skip to first unread message

sabine.hubri...@t-online.de

unread,
Apr 8, 2013, 4:47:07 AM4/8/13
to
Hi,
I'm new to this forum so sorry if I do anything wrong for a start ...
in fact I'm not even sure if it is the correct group as I'm looking for the right technical idea in xslt, not for something in the resulting "language" for excel, but because the result shall be used in excel it might be.

I'm generating an Excel-Package in Office Open XML format, that is all the files that belong to the *.zip which is used as *.xlsx, using some of my own *.xslt-Stylesheets which parse some input.xml with data which cannot be imported directly . . .

I get some strings representing a date, like 2015-12-19

I know (from ZVON.org or W3.org), there are quite some functions which handle xs:dateTime as well as stingmanipulating functions like substring-after... which would fit to extract the year,month,day ... but still are string-related.

What I need is to calculate the effective numeric value of such a date, in the above example that would be 42357, in the algorithm Excel uses starting with 1.1.1900 (at least I seem to remember having read that being the startOfTheWorld ;-) )

Do I really have to calculate that on my own?

I cannot believe that nobody else would need such a thing and that there's no such function somewhere already ;-(
so thanks for any help,
bine
0 new messages