Well, a timestamp is defined as the integer number of seconds from 1st of January 1970, but not 1st January 1970 itself, that would mean 0 seconds and that is reserved as the 'zero time'.
So, converting is easy in T-Sql (Microsoft Sql Server):
@dateTime=DateAdd(second,{d '1970-01-01'},@timeStamp)
@timeStamp=DateDiff(second,{d '1970-01-01'},@dateTime)
The {d 'yyyy-MM-dd'} notation is an ODBC escape sequence.
.NET
(283)
administrative
(42)
Ajax
(42)
ASP.NET
(144)
bicycle
(2)
books
(152)
browser
(7)
C#
(121)
cars
(1)
chess
(25)
CodePlex
(10)
Coma
(7)
database
(37)
deployment
(3)
Entity Framework
(2)
essay
(96)
flash/shockwave
(2)
flex
(1)
food
(3)
friend
(2)
game
(14)
idea
(5)
IIS
(8)
javascript
(76)
LInQ
(2)
Linux
(6)
management
(4)
manga
(35)
misc
(590)
mobile
(1)
movies
(70)
MsAccess
(1)
murder
(2)
music
(62)
mysql
(1)
news
(96)
permanent
(1)
personal
(58)
PHP
(1)
physics
(2)
picture
(261)
places
(12)
politics
(13)
programming
(462)
rant
(107)
religion
(3)
science
(38)
Sharepoint
(3)
software
(53)
T4
(2)
technology
(10)
Test Driven Development
(4)
translation
(2)
VB
(2)
video
(87)
Visual Studio
(44)
web design
(45)
Windows API
(8)
Windows Forms
(2)
Windows Server
(4)
WPF/Silverlight
(60)
XML
(10)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment