[libreoffice-users] Calc function to return the daynumber weeknumber of the year

2014-07-19 Thread Tanstaafl
Like how MONTH(TODAY()) returns the month$ of the year (ie, 1 for 
January, 12 for December)...


Is their one?

Or if not, maybe a simple formula I can use to calculate?

Thanks

--
To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted


Re: [libreoffice-users] Calc function to return the daynumber weeknumber of the year

2014-07-19 Thread Stefan Weigel
Hi,

Am 19.07.2014 15:25, schrieb Tanstaafl:

 Is their one?

Yes.

https://help.libreoffice.org/Calc/WEEKNUM
https://help.libreoffice.org/Calc/Date_and_Time_Functions#Functions

Cheers,

Stefan

-- 
LibreOffice - Die Freiheit nehm' ich mir!

-- 
To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted


Re: [libreoffice-users] Calc function to return the daynumber weeknumber of the year

2014-07-19 Thread Brian Barker

At 09:25 19/07/2014 -0400, Charles Marcus wrote:

Calc function to return the daynumber weeknumber of the year


Sorry, but I've no idea what a daynumber weeknumber is.

Like how MONTH(TODAY()) returns the month$ of the year (ie, 1 for 
January, 12 for December)...


Oddly, you've defined the quantity you don't want but not the one you do.


Is there one? Or if not, maybe a simple formula I can use to calculate?


Surely one or the other.

Here are some possibilities:

WEEKDAY(Date; Type) gives the day of the week (as an integer) for the 
given date value. For Type = 1, Sunday is day 1; for Type = 2, Monday 
is day 1; for Type = 3, Monday is day 0.


WEEKNUM(Date; Mode) gives the number of the week within the year for 
the given date value. For Type = 1, the week starts on Sunday; for 
any other value, on Monday.


WEEKNUM_ADD(Date; Mode) mimics Excel's WEEKNUM() function.

Note that you can also simply format cells as WW to display a week number.

You probably need to experiment with these to ensure they do what you 
need, since definitions of day and week numbers are many and various. 
Test to ensure that whatever you choose acts as you expect around the 
end of the year and in years with fifty-three weeks. Which years have 
fifty-three weeks itself depends on the other definitions.


I trust this helps.

Brian Barker


--
To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted