Monday, April 27, 2009

T-SQL Epoch Date Conversion

I needed a way to convert a BIGINT containing a date in SSE (seconds since epoch - 1/1/1970) format into a DATETIME. The following query does the trick:

SELECT DATEADD(DAY, CAST(sse_value AS BIGINT)/86400000, CAST('19700101' AS DATETIME))

Thanks to some guy named Steve Kass for pointing this out on DevelopmentNow.

Saturday, April 11, 2009

Safari color issues?

If you're experiencing color issues with your images in Safari, make sure that an embedded color profile was not saved with the image. Open the image in Photoshop; File --> Save As; uncheck Embed Color Profile; save image.