Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 convert timestamp

Author  Topic 

slimt_slimt
Aged Yak Warrior

746 Posts

Posted - 2008-10-21 : 17:09:55
Hi,

was browsing this forum for converting timestamp and couldn't find anything good.

anyways, how to convert timestamp to anykind of date-time format?

thank you.

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2008-10-21 : 17:12:43
Do you mean column type timestamp?
That is not for convert to date time (like in unix).

Webfred

No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-10-21 : 17:13:09
See Books Online for CONVERT function.



E 12°55'05.63"
N 56°04'39.26"
Go to Top of Page

slimt_slimt
Aged Yak Warrior

746 Posts

Posted - 2008-10-21 : 17:21:09
yes, i mean column type timestamp.

Peso - i looked; couldn't find anything usefull.
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-10-21 : 17:23:28
SELECT CONVERT(CHAR(8), CURRENT_TIMESTAMP, 112)


E 12°55'05.63"
N 56°04'39.26"
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2008-10-21 : 17:25:04
column type timestamp is an sql server intern administered value and it's not possible to get a date time like expected.

Webfred

No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2008-10-21 : 17:26:02
I swear!

No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page
   

- Advertisement -