develooper Front page | | Postings from October 2004

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

Thread Previous | Thread Next
Gerber, Christopher J
October 28, 2004 09:40
RE: [OT] Excel Golf: Unix Time to Excel Time in one line
Message ID:

> > > >  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-precedence operator "<". 
> Removing the parens around Y causes the addition of X/3600 to 
> occur before the < which is not what we want.
> Explicitly:
> 	25569+X/86400+(a<b)*Z/24
> Doesn't equal
> 	25569+(X/3600+a<b)*Z/24  (consider X very large or Z=0) 
> We need another set of parens to make it correct. 
> 	25569+(X/3600+(a<b)*Z)/24
> One step forward two steps back, or <fingers crossed> am I 
> missing something? </fingers crossed>

Hmmm... now I have to go back and look!  (fingers crossed as well...)

Here's the formula that I last posted:
   = 25569+(A2/3600+

I really made a mess of it.  I moved the A2/3600 inside a parenthesis that
did not match with the last closing parenthesis.  My results are completely
off now.  That's one point for you! ;)  If it's any excuse, I live about 90
minutes from Boston and haven't been getting much sleep this week.  (Go

The Perl diehards must be pretty tired of us by now!


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.

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About