Susan Davis (futabachan) wrote,
Susan Davis
futabachan

Brain twister of the evening

So, why does

update tx set service_date = '03-24-2000' where tx_number = 99999999

followed by

select service_date from tx where tx_number=99999999

return a value of June 19, 1894?

More to the point, why does it only do it in one place in the code, and work just fine everywhere else?

Hmpf.

(Incidentally, what happened on June 19, 1894, anyway? It doesn't seem to be a round multiple of time from any halfway reasonable epoch....)

UPDATE: because what I actually wrote was

update tx set service_date = 03-24-2000 where tx_number = 99999999,

without the quotes.

3 - 24 - 2000 == -2021.
-2021 / 365 == a little over five and a half years.
A little over five and a half years before January 1, 1900 == June 19, 1894.
Tags: geek, work
Subscribe

  • Plenary update

    Wow, it's been a while since I've updated this. Most of the rest of the naginata folks in Toronto use Facebook, so I've been dragged kicking and…

  • Off to Japan

    I'm off to Japan for two weeks as of the first thing Thursday morning. I'll be competing in the World Naginata Championships, and participating in…

  • Thanks, everyone.

    Thanks, everyone, for your birthday wishes. It's been a rough year, and a particularly rough month, and I feel like I've made a complete hash of the…

  • Error

    default userpic

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 9 comments