[Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register]

Author Message
dummydecoy
General User

Joined: 06 Oct 2010
Posts: 39

 Posted: Wed May 09, 2012 10:59 am    Post subject: [SOLVED] formula help, convert date based on time input Guys, please help me create this A1 is where the user will input the start time A2 is where the user will input the end time B1 is where the user will input the start DATE But, I need to deduct 12 hours from the times entered in A1 and A2. So, C1 has the formula =A1-"12:00" C2 has =A2-"12:00" D1 will determine the adjusted date with the formula =A1+B1-0.5 Now I need to have D2 determine the end date, based on the end time in A2 and the D1. Is this possible? If so, what is the formula?Last edited by dummydecoy on Thu May 10, 2012 7:49 am; edited 1 time in total
Villeroy
Super User

Joined: 04 Oct 2004
Posts: 10106
Location: Germany

 Posted: Wed May 09, 2012 11:58 am    Post subject: Where is the start date?_________________Rest in peace, oooforum.org Get help on https://forum.openoffice.org
scsisys

Joined: 17 Dec 2009
Posts: 248

 Posted: Wed May 09, 2012 1:48 pm    Post subject: dummydecoy.... One way to do this is as follows: In A1, key in the date and start time.....05-08-12 07:00 In A2, key in the date and end time......05-08-12 11:00 Format A1 & A2 to the time format of your choice. In B1, key in .....=A1 In B2, key in .....=A2 Format B1 & B2 to the date format of your choice. In C1, key in......=A1-.5 In C2, key in .....=A2-.5 Format C1 & C2 to the same time format as A1 & A2. In D1, key in .....=C1 In D2, key in .....=D2 Format D1 & D2 to the same date format as B1 & B2. scsisys_________________OO 3.2.1 Win XP /SP3
dummydecoy
General User

Joined: 06 Oct 2010
Posts: 39

Posted: Wed May 09, 2012 3:13 pm    Post subject:

 scsisys wrote: dummydecoy.... One way to do this is as follows: In A1, key in the date and start time.....05-08-12 07:00 In A2, key in the date and end time......05-08-12 11:00 Format A1 & A2 to the time format of your choice. In B1, key in .....=A1 In B2, key in .....=A2 Format B1 & B2 to the date format of your choice. In C1, key in......=A1-.5 In C2, key in .....=A2-.5 Format C1 & C2 to the same time format as A1 & A2. In D1, key in .....=C1 In D2, key in .....=D2 Format D1 & D2 to the same date format as B1 & B2. scsisys

Thank you sir, but there seems to be one problem. For example, I put
A1, 5-10-2012 10:30 PM
A2, 5-10-2012 01:19 AM

The end date end up earlier than the start date.
Basically, the purpose of this is to convert the time zone from MNL to EST which is earlier 12 hours. I'm just trying to automate the calculation of the end date (D2). Your approach works almost perfectly except for that particular error I posted
scsisys

Joined: 17 Dec 2009
Posts: 248

 Posted: Wed May 09, 2012 4:23 pm    Post subject: dummydecoy.... In your last example, A5 is shown as 10:30 PM (start time ??) on 12-30-1899 and A6 is shown as 1:19 AM ( end time ?? ) on 12-30-1899. Seems to me that the end time date would be 12-31-1899 as column A is the non-adjusted data. D6 would then be 12-30-1899 and 1:19 PM. scsisys_________________OO 3.2.1 Win XP /SP3
Villeroy
Super User

Joined: 04 Oct 2004
Posts: 10106
Location: Germany

 Posted: Thu May 10, 2012 12:14 am    Post subject: =B1-A1+(B1
dummydecoy
General User

Joined: 06 Oct 2010
Posts: 39

 Posted: Thu May 10, 2012 7:48 am    Post subject: Oh... yes, you are right. My bad. End date should have been 12-31. Thank you! problem solved. Thank you too Villeroy, the use of < opens up further possibilities I did not know about. Cheers everyone!
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First
 All times are GMT - 8 Hours Page 1 of 1

 Jump to: Select a forum OpenOffice.org Forums----------------Setup and TroubleshootingOpenOffice.org WriterOpenOffice.org CalcOpenOffice.org ImpressOpenOffice.org DrawOpenOffice.org MathOpenOffice.org BaseOpenOffice.org Macros and APIOpenOffice.org Code Snippets Community Forums----------------General DiscussionSite Feedback
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