Monday, 10 November 2008

Dealing with HTTP formatted dates with Tweet-SQL



Since my post about using Tweet-SQL to archive your Twitter timeline I noticed what a pain dealing with HTTP formatted dates is and how useful it would be to turn them into something a little more SQL Server friendly. So, I came up with a function that will allow this nasty date format to be handled a little more easily.

SELECT dbo.tweet_fnc_dateconvert('Tue Nov 04 22:33:39 +0000 2008');

Returns an ODBC canonical (with milliseconds) formatted datetime value, i.e.  2008-11-04 22:33:39.000

This function will be included in the upcoming release of Tweet-SQL.



No comments: