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 |
poser
Posting Yak Master
124 Posts |
Posted - 2008-01-23 : 18:41:28
|
Is it possible to write a select statment that converts a unix date.I have a table called DATES with two column Assigned Resolved911341436 911843687Can you SELECT Assigned from Datesto return this format:Tuesday, November 17, 1998 2:23:56 PMThanks for any and all help!R/P |
|
jdaman
Constraint Violating Yak Guru
354 Posts |
Posted - 2008-01-23 : 18:51:23
|
declare @a intselect @a = 911341436select convert(varchar, dateadd(second, @a, '19700101'), 109) |
 |
|
poser
Posting Yak Master
124 Posts |
Posted - 2008-01-23 : 19:02:15
|
The problem is I have over a thousand records to convert and I was looking for a way to return all of them in the new format.Is this possible?Thanks for your help.R/P |
 |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2008-01-23 : 20:17:31
|
[code]select dateadd(second, yourcolumn, '19700101') as new_datetime_colfrom yourtable[/code]Do the formating of the required date/time format in your front end application KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
|
|