4
Aug '09

Numbers of Days

   Posted by: lyle   in Domestic, Geeky, Web Development, Work-related

A silly reason that I like databases, and SQL…

Herself asked me “How many days between 1st January and August 10th?” – for reasons beyond comprehension.

Normally, something like this would involve figuring out how many weeks, or counting weeks/days in a diary or whatever.

In SQL, it’s a simple “SELECT DATEDIFF(’2009-01-01′,’2009-08-10′)” and lo, you have the answer. (221 days, if anyone cared)

This entry was posted on Tuesday, August 4th, 2009 at 07:30 and is filed under Domestic, Geeky, Web Development, Work-related. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a reply

Name (*)
Mail (will not be published) (*)
URI
Comment