format field into a date

Guys

I have a field in sql server 2008 which is in seconds ie 1360146299 I believe its working from 1904 forwards.

how can I alter this to show a date more understandable in t-sql

Regards
DarrenJacksonAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

PortletPaulfreelancerCommented:
do you know what 1360146299 should represent in more conventional yyyy-mm-dd terms?
(or any other similar values to dates that you know are a particular date)
0
PortletPaulfreelancerCommented:
try this perhaps using the unix epoch date

SELECT
  DATEADD(second, 1360146299, '19700101')
, convert(varchar, DATEADD(second, 1360146299, '19700101') ,121)

= 2013-02-06 10:24:59.000
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
dsackerContract ERP Admin/ConsultantCommented:
Sure it's not starting from 1970? If I add these seconds to 1970, I get a date within 2013. However, you can take the following and work it however you wish:

SELECT  DATEADD(s, 1360146299, '1/1/1970')

Result:  2013-02-06 10:24:59.000

If you start from 1904, you get this:

SELECT  DATEADD(s, 1360146299, '1/1/1904')

Result:  1947-02-06 10:24:59.000
0
DarrenJacksonAuthor Commented:
Sorry 1970 is more likely

Both answers help so I will split

Thank you for a quick response
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.