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.
Author |
Topic |
lassew
Starting Member
5 Posts |
Posted - 2005-06-03 : 08:41:15
|
I'm trying to analyse a SQL Server 8 database where date is stored as Int, Null. Is it possible to convert it to a dateformat? |
|
Seventhnight
Master Smack Fu Yak Hacker
2878 Posts |
Posted - 2005-06-03 : 08:42:49
|
what kind of int?? what does it look like?CoreySecret Service Agent: Mr. President, you're urinating on me.President Lyndon Johnson: I know I am. It's my prerogative. |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2005-06-03 : 08:43:26
|
how is it stored can you give an example?select covert(datetime, YourDateColumn)from YourTableAmeGo with the flow & have fun! Else fight the flow |
|
|
lassew
Starting Member
5 Posts |
Posted - 2005-06-03 : 08:47:45
|
Some exemples of dok_dt1046440184104644018410464401841047027417104703349910470346831047034683 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-06-03 : 08:51:38
|
What output do you expect from those?MadhivananFailing to plan is Planning to fail |
|
|
X002548
Not Just a Number
15586 Posts |
|
Arnold Fribble
Yak-finder General
1961 Posts |
Posted - 2005-06-03 : 10:21:01
|
Wild guess: it's seconds from UNIX epoch.DATEADD(s, dok_dt, '19700101 00:00:00') |
|
|
X002548
Not Just a Number
15586 Posts |
Posted - 2005-06-03 : 10:36:05
|
Good lord.....not again...What the hell don't you know?Gotta blog this as well...DECLARE @dok_dt intSELECT @dok_dt = 1047034683SELECT DATEADD(s, @dok_dt, '19700101 00:00:00') Brett8-)Hint: Want your questions answered fast? Follow the direction in this linkhttp://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx |
|
|
|
|
|