| View previous topic :: View next topic |
| Author |
Message |
dummydecoy General User

Joined: 06 Oct 2010 Posts: 39
|
Posted: Wed Apr 11, 2012 1:06 pm Post subject: [SOLVED] Noob formula request, deduct 12 hours from date |
|
|
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 |
|
 |
Villeroy Super User


Joined: 04 Oct 2004 Posts: 10065 Location: Germany
|
Posted: Wed Apr 11, 2012 1:30 pm Post subject: |
|
|
=A2-0.5 _________________ Rest in peace, oooforum.org
Get help on http://forum.openoffice.org |
|
| Back to top |
|
 |
dummydecoy General User

Joined: 06 Oct 2010 Posts: 39
|
Posted: Wed Apr 11, 2012 1:37 pm Post subject: |
|
|
| 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 |
|
 |
ken johnson Super User

Joined: 23 Apr 2009 Posts: 1849 Location: Sydney, Australia
|
Posted: Wed Apr 11, 2012 2:56 pm Post subject: |
|
|
Try...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 |
|
 |
dummydecoy General User

Joined: 06 Oct 2010 Posts: 39
|
Posted: Wed Apr 11, 2012 3:00 pm Post subject: |
|
|
| ken johnson wrote: | Try...in B1.
Ken Johnson |
WOW. Thank you so much Mr. Ken Johnson. It worked perfectly. I am very happy.
Take care! Thread solved! |
|
| Back to top |
|
 |
|