![]() |
time around midnight
How do I convert time of day to time according to midnight? Ex. 21:37 to
-2,23? Or 02:43 to +2,43? Midnight is defined as 0. |
time around midnight
With time in A1 ...for 21:47 ...
=(HOUR(1-A1)+MINUTE(1-A1)*0.01)*-1 For 02:43 ... =HOUR(B1)+MINUTE(B1)*0.01 With I assume some test (IF condition) if time is before or after MIDDAY? "Mai-Britt" wrote: How do I convert time of day to time according to midnight? Ex. 21:37 to -2,23? Or 02:43 to +2,43? Midnight is defined as 0. |
time around midnight
If I am reading what you want correctly, try
=if(mod(time_entry,1)<0.5,hour(time_entry)+minute( time_entry)/100,-hour(1-mod(time_entry,1))-minute(1-mod(time_entry,1))/100 "Mai-Britt" wrote: How do I convert time of day to time according to midnight? Ex. 21:37 to -2,23? Or 02:43 to +2,43? Midnight is defined as 0. |
All times are GMT +1. The time now is 10:13 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com