Kylie Minogue's steamy first encounter with Michael Hutchence revealed by her then-boyfriend Jason Donovan
Adonis Fury, 7, tears up the dance floor as he shows off his funky moves at his sister Venezuela's wedding
Venezuela Fury, 16, 'will swap her parents' £8m mansion to live in a caravan with her new husband Noah Price, 19'
Burnham is in the running... but why did the jogging mayor drive home?
Revealed: How Tess & Vernon will split their £6M fortune amicably in 'showbiz's friendliest divorce'
Backlash over Brexit 'betrayal': Lord Gove blasts Streeting and Burnham as Kemi says 'Labour clowns couldn't negotiate with the EU'
Police searching Chelmsford street after 'large disturbance'
Princesses Eugenie and Beatrice are set to make their first royal appearance in the coming weeks - 'without Andrew and Fergie'
Over-ambitious sellers forced to cut prices on 32% of homes: Rightmove
Ten cheapest locations in Britain for first-time buyers - where £150K will get you on the ladder
Representative Line: Dating Backwards
Another representative line, and this one comes from an Excel spreadsheet. But, per Remy's Law of Requirements gathering ("No matter what the requirements doc says, what your users wanted was Excel"), this one was actually written by a developer. A developer who didn't understand how Excel works, but more important, didn't understand how dates worked either.
This comes from Ulysse J.
=CONCATENER(SI(MOIS($A18)>9;ANNEE($A18)-2000;(ANNEE($A18)-2000)*10);SI(JOUR($A18)>9;MOIS($A18);MOIS($A18)*10);JOUR($A18))Now, the first thing: Excel function names are locale specific. This was written in France, so the functions are French. CONCATENER is "concatenate", SI is "if", MOIS is "month", and so on.
The purpose of this function is to convert a field (cell A18) in DD/MM/YYYY into YYMMDD. So how does it do this?
Well, we check the month. If it's greater than 9, we output the year minus 2000. If it's less than 9, then, we output the year minus 2000, multiplied by 10. That is to say, August, 2026 would start by outputting 260. We repeat this logic for the days: if the day is larger than 9, we output the month, otherwise we output the month times 10. Finally, we output the day.
This is attempting to do padding. There's just a problem. Imagine February 1st, 2009- an actual date in the document. We convert the year into 90, the month into 20, rendering the date as 90210. That's incorrect. And once we get to 2100, if there is still an Excel in 2100 (I joke: of course Excel will still exist in 2100. Humanity won't, but the robots will use Excel), this will also break. Not that it matters- I mean, YYMMDD doesn't make sense by that point.
Obviously, the correct solution is to use Excel's rich, built-in formatting functions to convert between date formats. It's easy! But Ulysse raises another point:
Extra points: even if you do not know how to do proper [formatting], the input format is guaranteed to have correct padding. I would just concatenate parts of it (treating dates as text is bad, but still less bad than treating them as integer triplets).
I will say this: I know a software developer wrote this, because your average Excel user could easily write bad formulas, but never bad in this kind of convoluted way. You need a real expert to do something this bad.