RE: [OT] Excel Golf: Unix Time to Excel Time in one line

2004-10-28 Thread Gerber, Christopher J
Alistair, > > > > 86400/24 can be changed to 3600 > > 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 > > Not quite: > X/86400+(Y)/24 = (X/3600+(Y))/24 > > In our formula

RE: [OT] Excel Golf: Unix Time to Excel Time in one line

2004-10-28 Thread McGlinchy, Alistair
Chris, > > > 86400/24 can be changed to 3600 > 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 Not quite: X/86400+(Y)/24 = (X/3600+(Y))/24 In our formula, Y contains low-precedenc

RE: [OT] Excel Golf: Unix Time to Excel Time in one line

2004-10-28 Thread Gerber, Christopher J
> -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/8

RE: [OT] Excel Golf: Unix Time to Excel Time in one line

2004-10-28 Thread McGlinchy, Alistair
> From: Gerber, Christopher J [mailto:[EMAIL PROTECTED] > A couple more small changes: > > AND(X,Y) can be changed to (X)*(Y) in this case > > 1/24*X can be changed to X/24 > > 2/24 can be changed to 1/12, although it's not shorter > > 86400/24 can be changed to 3600 > > SO... > > =25569

RE: [OT] Excel Golf: Unix Time to Excel Time in one line

2004-10-26 Thread Gerber, Christopher J
> -Original Message- > From: McGlinchy, Alistair > From: Stephen Turner: > > On Tue, 26 Oct 2004, McGlinchy, Alistair wrote: > > > Here's a horrid 297 Byte solution: > > > I don't know much about Excel, but I think DATE(1970,1,1) can be > > spelled 25569. If I'm right, that would save yo

RE: [OT] Excel Golf: Unix Time to Excel Time in one line

2004-10-26 Thread Stephen Turner
On Tue, 26 Oct 2004, Stephen Turner wrote: > > I don't know if you can have the time in other timezones though. Excel > doesn't seem to know about them, unless I'm missing something. I set my > clock to Pacific time, and NOW() changed to 38286.29 (i.e. 29% of the way > through today), and 1/1/1970

RE: [OT] Excel Golf: Unix Time to Excel Time in one line

2004-10-26 Thread Stephen Turner
On Tue, 26 Oct 2004, McGlinchy, Alistair wrote: > > I feel suitably humbled. Thanks to you and Joe for some significant > improvements. > > =25569+A4/86400+1/24*AND(DATE(YEAR(25569+A4/86400),5,1)-WEEKDAY(DATE(YEA > R(25569+A4/86400),5,1),2)+1/24<25569+A4/86400,25569+A4/86400 5569+A4/86400),11,1)-WE

RE: [OT] Excel Golf: Unix Time to Excel Time in one line

2004-10-26 Thread McGlinchy, Alistair
From: Stephen Turner: > On Tue, 26 Oct 2004, McGlinchy, Alistair wrote: > > Here's a horrid 297 Byte solution: > I don't know much about Excel, but I think DATE(1970,1,1) can > be spelled 25569. If I'm right, that would save you at least > 63 strokes. > I feel suitably humbled. Thanks to you

Re: [OT] Excel Golf: Unix Time to Excel Time in one line

2004-10-26 Thread Keith C. Ivey
Stephen Turner <[EMAIL PROTECTED]> wrote: > I don't know much about Excel, but I think DATE(1970,1,1) can be > spelled 25569. If I'm right, that would save you at least 63 > strokes. Also, "/24/60/60" can be spelled "/86400". That saves another 21. -- Keith C. Ivey <[EMAIL PROTECTED]> Washing

Re: [OT] Excel Golf: Unix Time to Excel Time in one line

2004-10-26 Thread Stephen Turner
Also 24*60*60=86400, saving you another 21. -- Stephen Turner, Cambridge, UKhttp://homepage.ntlworld.com/adelie/stephen/ "Low Priced Cambridge Clare College. Big selection at eBay UK!" (Ad after Google search for Clare College Cambridge)

Re: [OT] Excel Golf: Unix Time to Excel Time in one line

2004-10-26 Thread Stephen Turner
On Tue, 26 Oct 2004, McGlinchy, Alistair wrote: > > Here's a horrid 297 Byte solution: > > = DATE(1970,1,1)+ A2/24/60/60+1/24 * > AND( > DATE(YEAR(DATE(1970,1,1)+A2/24/60/60),5,1) > - > WEEKDAY(DATE(YEAR(DATE(1970,1,1)+A2/24/60/60),5,1),2)

Re: [OT] Excel Golf: Unix Time to Excel Time in one line

2004-10-26 Thread Jasper
On Tue, 26 Oct 2004 13:58:04 +0100, McGlinchy, Alistair <[EMAIL PROTECTED]> wrote: > = DATE(1970,1,1)+ A2/24/60/60+1/24 * >AND( >DATE(YEAR(DATE(1970,1,1)+A2/24/60/60),5,1) >- >WEEKDAY(DATE(YEAR(DATE(1970,1,1)+A2/24/60/60),5,1),2