SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Timestamp coversion
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

sinapra
Starting Member

India
24 Posts

Posted - 05/24/2007 :  08:35:15  Show Profile  Send sinapra an AOL message  Send sinapra a Yahoo! Message  Reply with Quote
Hello All

I have a timestamp field in the table that is of Float datatype and an example of one Timestamp is '37281.5103009259'. I am not sure how to convert this to Date format because as far as i know unix timestamp is only 10 digit and has no decimal in between.

I donot have access to script file else would have been able to show you.

Thanks

Cheers

Edited by - spirit1 on 05/24/2007 09:14:24

sshelper
Posting Yak Master

216 Posts

Posted - 05/24/2007 :  08:42:55  Show Profile  Visit sshelper's Homepage  Reply with Quote
Try using the CAST function to convert the float into a DATETIME data type:

select cast(37281.5103009259 as datetime)

SQL Server Helper
http://www.sql-server-helper.com
Go to Top of Page

sinapra
Starting Member

India
24 Posts

Posted - 05/24/2007 :  09:09:32  Show Profile  Send sinapra an AOL message  Send sinapra a Yahoo! Message  Reply with Quote
That helped SSH, you are great........

Cheers
Go to Top of Page

spirit1
Cybernetic Yak Master

Slovenia
11751 Posts

Posted - 05/24/2007 :  09:14:35  Show Profile  Visit spirit1's Homepage  Reply with Quote
moved from script library.

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
Go to Top of Page

madhivanan
Premature Yak Congratulator

India
22765 Posts

Posted - 05/26/2007 :  03:32:21  Show Profile  Send madhivanan a Yahoo! Message  Reply with Quote
quote:
Originally posted by spirit1

moved from script library.

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp


Can you move other threds as well?
There are many questions posted at Script Library

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

khtan
In (Som, Ni, Yak)

Singapore
17658 Posts

Posted - 05/26/2007 :  06:23:41  Show Profile  Reply with Quote
quote:
Can you move other threds as well?
There are many questions posted at Script Library

Good idea.


KH

Go to Top of Page

spirit1
Cybernetic Yak Master

Slovenia
11751 Posts

Posted - 05/26/2007 :  09:02:50  Show Profile  Visit spirit1's Homepage  Reply with Quote
they are all quite old... any particular reason?

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
Go to Top of Page

madhivanan
Premature Yak Congratulator

India
22765 Posts

Posted - 05/26/2007 :  10:32:24  Show Profile  Send madhivanan a Yahoo! Message  Reply with Quote
quote:
Originally posted by spirit1

they are all quite old... any particular reason?

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp


No reason. Just a thought

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.11 seconds. Powered By: Snitz Forums 2000