SQL Code – how to convert timestamp to DATETIME

select dateadd(second,last_update_time,’01/01/1970′) from YOUR_TABLE_NAME

(obviously, last_update_time is the timestamp in seconds)

Advertisements
This entry was published on February 13, 2009 at 4:05 pm and is filed under Database. Bookmark the permalink. Follow any comments here with the RSS feed for this post.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: