develooper Front page | | Postings from October 2004

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

Thread Previous | Thread Next
McGlinchy, Alistair
October 28, 2004 09:09
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.
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. 

One step forward two steps back, or <fingers crossed> am I missing
something? </fingers crossed>



Registered Office:
Marks and Spencer plc
Waterside House
35 North Wharf Road
W2 1NW

Registered No. 214436 in England and Wales.

Telephone (020) 7935 4422
Facsimile (020) 7487 2670

Please note that electronic mail may be monitored.

This e-mail is confidential. If you received it by mistake, please let us know and then delete it from your system; you should not copy, disclose, or distribute its contents to anyone nor act in reliance on this e-mail, as this is prohibited and may be unlawful.

The registered office of Marks and Spencer Financial Services PLC, Marks and Spencer Unit Trust Management Limited, Marks and Spencer Life Assurance Limited and Marks and Spencer Savings and Investments Limited is Kings Meadow, Chester, CH99 9FB. These firms are authorised and regulated by the Financial Services Authority. 

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