Date: prev next · Thread: first prev next last
2015 Archives by date, by thread · List index


On 12 Jun 2015 at 8:49, Gordon Burgess-Parker wrote:

Date sent:              Fri, 12 Jun 2015 08:49:35 +0100
From:                   Gordon Burgess-Parker <gordonbp@mail.com>
To:                     users@global.libreoffice.org
Subject:                Re: [libreoffice-users] Calc date formulae

On 12/06/15 08:44, Dries Feys wrote:
If the date to check is in B3, try the following formula:

=IF(WEEKDAY(B3)=1;B3-2;IF(WEEKDAY(B3)=7;B3-1;B3))

Don't forget to format the target cell as a date ;-)

Succes



Not sure why what I see in email sent isn't what I get on the list?
Column A has the date
Friday, June 12, 2015

Column B has the formula
=A1-(MOD(INT(A1),7)<2)*(MOD(INT(A1),7)+1)

Which uses the value of A1, Logical math then does if it is true that it is a 
Saturday or Sunday, it will then subtract the 1 or 2 to get the previous Friday 
Date. 

 Long ago, used a Zeller congruency formula to calculate day of week using 
mod. 0 - sat 1-sun ...

Hopefully, this will show up correctly.


Great! Brilliant! Thanks very much!



-- 
To unsubscribe e-mail to: users+unsubscribe@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


+----------------------------------------------------------+
  Michael D. Setzer II -  Computer Science Instructor      
  Guam Community College  Computer Center                  
  mailto:mikes@kuentos.guam.net                            
  mailto:msetzerii@gmail.com
  http://www.guam.net/home/mikes
  Guam - Where America's Day Begins                        
  G4L Disk Imaging Project maintainer 
  http://sourceforge.net/projects/g4l/
+----------------------------------------------------------+

http://setiathome.berkeley.edu (Original)
Number of Seti Units Returned:  19,471
Processing time:  32 years, 290 days, 12 hours, 58 minutes
(Total Hours: 287,489)

BOINC@HOME CREDITS
ROSETTA     30650812.183751   |   SETI        54443841.296543
ABC         16613838.513356   |   EINSTEIN    63454530.308699


-- 
To unsubscribe e-mail to: users+unsubscribe@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

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.