OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

[SOLVED] Noob formula request, deduct 12 hours from date

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc
View previous topic :: View next topic  
Author Message
dummydecoy
General User
General User


Joined: 06 Oct 2010
Posts: 39

PostPosted: Wed Apr 11, 2012 1:06 pm    Post subject: [SOLVED] Noob formula request, deduct 12 hours from date Reply with quote

Help guys, can't figure out how to do this, I need to deduct 12 hours from the time and adjust the date as necessary.
Example:
B2 deducts 12 hours from time data entry in A2 (=A2-"12:00")
But I need B1 to also adjust the date from the date entry in A1 by 12 hours.

For example, 5pm 4-12-2012becomes 5am 4-12-2012
but 5am 4-12-2012 become 5pm 4-11-2012


Last edited by dummydecoy on Wed Apr 11, 2012 3:00 pm; edited 1 time in total
Back to top
View user's profile Send private message
Villeroy
Super User
Super User


Joined: 04 Oct 2004
Posts: 10106
Location: Germany

PostPosted: Wed Apr 11, 2012 1:30 pm    Post subject: Reply with quote

=A2-0.5
_________________
Rest in peace, oooforum.org
Get help on https://forum.openoffice.org
Back to top
View user's profile Send private message
dummydecoy
General User
General User


Joined: 06 Oct 2010
Posts: 39

PostPosted: Wed Apr 11, 2012 1:37 pm    Post subject: Reply with quote

Thank you but if the time in B2 is 5pm, for example, date should not be adjusted since 5pm-12 hours is still 5am of the same day.
Back to top
View user's profile Send private message
ken johnson
Super User
Super User


Joined: 23 Apr 2009
Posts: 2032
Location: Sydney, Australia

PostPosted: Wed Apr 11, 2012 2:56 pm    Post subject: Reply with quote

Try...
Code:
=A1+A2-0.5
in B1.
Ken Johnson
_________________
If your problem has been solved please add "[Solved]" to the beginning of your first post title (edit button).
Back to top
View user's profile Send private message
dummydecoy
General User
General User


Joined: 06 Oct 2010
Posts: 39

PostPosted: Wed Apr 11, 2012 3:00 pm    Post subject: Reply with quote

ken johnson wrote:
Try...
Code:
=A1+A2-0.5
in B1.
Ken Johnson


WOW. Thank you so much Mr. Ken Johnson. It worked perfectly. Very Happy I am very happy.
Take care! Thread solved!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group