RE: [OT] Excel Golf: Unix Time to Excel Time in one line
"Gerber, Christopher J" <[email protected]> Thu, 28 Oct 2004 10:48:47 -0400
| Newsgroups | gmane.comp.lang.perl.golf |
|---|---|
| Message-ID | <DAE79A519D0ECB4DA2E3864CDB61A4E7D31B46@groamrexm01.amer.pfizer.com> |
> -----Original Message----- > From: McGlinchy, Alistair > > > > 86400/24 can be changed to 3600 > > > > Hence so far my best score is 161 with: > = 25569+A2/86400+( > DATE(A2/316^3+14,5,)-WEEKDAY(DATE(A2/316^3+14,5,))+25/24 > < > 5115+A2/86400 > )*( > 5115+A2/86400 > < > DATE(A2/316^3+14,11,)-WEEKDAY(DATE(A2/316^3+14,11,))+25/24 > )/24 Alistair, Very nice! My 86000/24 trick is still good, but I did a horrible job of explaining it. What I should have said is: X/86400+(Y)/24 = (X/3600+Y)/24 That gives us: = 25569+(A2/3600+ DATE(A2/316^3+14,5,)-WEEKDAY(DATE(A2/316^3+14,5,))+25/24 < 5115+A2/86400 )*( 5115+A2/86400 < DATE(A2/316^3+14,11,)-WEEKDAY(DATE(A2/316^3+14,11,))+25/24 )/24 It's only one less stroke though... Chris LEGAL NOTICE Unless expressly stated otherwise, this message is confidential and may be privileged. It is intended for the addressee(s) only. Access to this E-mail by anyone else is unauthorized. If you are not an addressee, any disclosure or copying of the contents of this E-mail or any action taken (or not taken) in reliance on it is unauthorized and may be unlawful. If you are not an addressee, please inform the sender immediately.