Calc function to return the daynumber weeknumber of the year

classic Classic list List threaded Threaded
5 messages Options
Tanstaafl Tanstaafl
Reply | Threaded
Open this post in threaded view
|

Calc function to return the daynumber weeknumber of the year

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: [hidden email]
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
Stefan Weigel Stefan Weigel
Reply | Threaded
Open this post in threaded view
|

Re: Calc function to return the daynumber weeknumber of the year

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: [hidden email]
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
m.a.riosv m.a.riosv
Reply | Threaded
Open this post in threaded view
|

Re: Calc function to return the daynumber weeknumber of the year

In reply to this post by Tanstaafl
For weeks they have been always in LibreOffice:

WEEKNUM( )     returns ISO 8601 week numbers.
WEEKNUM_ADD( )   returns week number as excel.

For days:

=DAYS(TODAY();DATE(YEAR(TODAY());1;1)-1)


I think the best way to find calc functions it's through function wizard:

Brian Barker Brian Barker
Reply | Threaded
Open this post in threaded view
|

Re: Calc function to return the daynumber weeknumber of the year

In reply to this post by Tanstaafl
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: [hidden email]
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

Tanstaafl Tanstaafl
Reply | Threaded
Open this post in threaded view
|

Re: Calc function to return the daynumber weeknumber of the year

In reply to this post by m.a.riosv
Perfect, thanks Miguel!

On 7/19/2014 10:04 AM, m.a.riosv <[hidden email]> wrote:

> For weeks they have been always in LibreOffice:
>
> WEEKNUM( )     returns ISO 8601 week numbers.
> WEEKNUM_ADD( )   returns week number as excel.
>
> For days:
>
> =DAYS(TODAY();DATE(YEAR(TODAY());1;1)-1)
>
>
> I think the best way to find calc functions it's through function wizard:
>
> <http://nabble.documentfoundation.org/file/n4116065/Captura.png>
>
>
>
> --
> View this message in context: http://nabble.documentfoundation.org/Calc-function-to-return-the-daynumber-weeknumber-of-the-year-tp4116056p4116065.html
> Sent from the Users mailing list archive at Nabble.com.
>


--
To unsubscribe e-mail to: [hidden email]
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