Ask Your Question
0

Function for date to day of week

asked 2015-10-10 00:35:05 +0100

Ruud gravatar image

updated 2016-03-18 03:44:58 +0100

Alex Kemp gravatar image

Hi,

Is there a function in Calc that I can use to translate a certain date to the day of the week (like Monday, Tuesday, Saturday).

So for 09-10-2015 it will have to give : "Friday"

Thanks for help, Ruud.

edit retag flag offensive close merge delete

Comments

LibreOffice version 5.0.2.2 OS version Windows 10 Detailed steps taken: Installed LO, installed offline help.

Ruud gravatar imageRuud ( 2015-10-13 23:41:48 +0100 )edit

2 Answers

Sort by » oldest newest most voted
0

answered 2019-08-20 05:27:03 +0100

Sheets gravatar image

It has been a while since this question was asked so my attempt at a solution may not be needed now; I needed to solve the same problem. I couldn't find a function that would do it so I wrote an 'if' function which is below:

=IF(MOD(B4,7)=0,"Sat",IF(MOD(B4,7)=1,"Sun",IF(MOD(B4,7)=2,"Mon",IF(MOD(B4,7)=3,"Tue",IF(MOD(B4,7)=4,"Wed",IF(MOD(B4,7)=5,"Thu",IF(MOD(B4,7)=6,"Fri",10)))))))

The 'if' function is a copy from my spreadsheet so it should work for you.

The reference 'B4' in the above function refers to the cell where the function can find the date to calculate its result.

You can alter the result format to whatever you desire; short names suit my spreadsheet.

edit flag offensive delete link more

Comments

1
Ratslinger gravatar imageRatslinger ( 2019-08-20 05:46:39 +0100 )edit
0

answered 2019-08-20 20:06:24 +0100

In a cell enter -> =now() <- that will give today's date. Then in that cell, format that cell (ctrl + 1) to return just the day, rather than day, month, year.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2015-10-10 00:35:05 +0100

Seen: 549 times

Last updated: Aug 20