September 5th, 2003, 08:41 AM
Date and Time Query
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 ?
October 13th, 2003, 09:58 AM
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,