|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
Date and Time Query
Hi,
I have a table who's called call_req. I have a column int called open_date. The date are stored in unix format like this : 1062748934 = 9 sept 2003 How can I do to do a select command wich return this format: dd/mm/yyyy ? Thanks |
|
#2
|
|||
|
|||
|
Unix dates start on 1st Jan 1970 (and is seconds since that date), you need to add UNIX date in seconds to the 1970 date, like so:
select convert(varchar(20),DATEADD(SECOND, 1062748934, '1970-01-01 00:00:00.000'),11) Hope this helps, Alaistair |
![]() |
| Viewing: Dev Shed Forums > Databases > MS SQL Development > Date and Time Query |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|