Ask Your Question

date functions weeknum() returns wrong date [closed]

asked 2012-11-10 01:16:01 +0200

detman710 gravatar image

date function returns February 20 1900 when use type today's date 11/09/2012 even if you enter it in this format weeknum(2012-09-11;1)

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2015-10-18 22:53:13.161691

3 Answers

Sort by » oldest newest most voted

answered 2012-11-10 02:27:04 +0200

m.a.riosv gravatar image

The date/time function need dates enter as date.

i.e. weeknum(2012-09-11;1) you are getting the week of 1905y06m14d (algebraic sum of 2012 - 09 - 11 = 1992 days after 1899y12m31d)

you must use WEEKNUM(DATE(2012;09;11);1)

also WEEKNUM("2012-09-11";1), but this form (date as text) can come in troubles, only can be used when no other interpretation of text is possible (locale language), and with direct references WEEKNUM(B15;1), Not with range functions WEEKNUM(SUM(B10:B15);1), better avoid.

edit flag offensive delete link more


Calc Guide 3.4 (spreadsheets): ODT, PDF. Page 376 date & time functions.

m.a.riosv gravatar imagem.a.riosv ( 2012-11-10 15:32:31 +0200 )edit

answered 2012-11-10 15:19:12 +0200

detman710 gravatar image

I had the format for the cell as date when it was changed to number it corrected the problem still would like to see better help explanations for functions any one recommended a book or web site

edit flag offensive delete link more

answered 2012-11-10 13:07:42 +0200

ROSt52 gravatar image

Could the above explanation INCLUDING the samples be added to the help file? I would regard as and added value.

edit flag offensive delete link more

Question Tools


Asked: 2012-11-10 01:16:01 +0200

Seen: 1,567 times

Last updated: Nov 10 '12