
Twitter Updates
- great synopsis of a two and a half hour long Alan Moore interview... somewhat different from what you'd expect http://t.co/M1Jq9QCk 15 minutes ago
- for some reason doing minor home repair-type work makes me incredibly anxious and impatient, when I'm not anxious doing most other things. 16 hours ago
- I had no idea. "Unicode's 'Pile of Poo' character" - http://t.co/aWVOSyjG 2 days ago
- "newb Gingrich" #Archer 2 days ago
- back home, cats retrieved, woke up way too early… can barely stay awake now though it bodes well for getting to bed on time tonight #jetlag 2 days ago
flickr/romkey




Categories
Tags
Ajax amazon ambient apple bat blogs brian eno computers dashboard david foster wallace deal Entertainment feed feedcache ie in memoriam internet explorer ios iphone ipod itunes jquery json leopard Life live+press livejournal mac macintosh macos x Music MySQL security sidebar simplify software taxes toilet TV UNIX uvfood web Wordpress world of warcraft writersMeta
Category Archives: MySQL
Showing a Column as a UNIX Timestamp in MySQL
While MySQL has quite an assortment of date and time formats which it supports, I usually find it most convenient to store timestamps as an INT and just put the UNIX seconds since the epoch value in there. … A drawback is that sometimes when I’m working with the database by hand it’s annoying to see the timestamps as big numbers – sometimes it would be very helpful to see them as dates and times. … The “FROM_UNIXTIME()” function will interpret a numeric column’s value as a UNIX seconds-from-the-epoch value and show it as a date and timestamp. Using it I can easily do things like: SELECT URL, FROM_UNIXTIME(Timestamp) FROM AccessLog; and see it as: +—————————+————————–+ | URL | FROM_UNIXTIME(timestamp) | +—————————+————————–+ | explore/users/94 | 2008-10-05 22:49:39 | +—————————+————————–+ rather than +—————————+————+ | URL | timestamp | +—————————+————+ | explore/users/94 | 1223261379 | +—————————+————+ Continue reading