SunQuest
           MS SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesMS SQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
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  
Old September 5th, 2003, 08:41 AM
jpillonel jpillonel is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 1 jpillonel User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #2  
Old October 13th, 2003, 09:58 AM
alaistair alaistair is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 5 alaistair User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 m 37 sec
Reputation Power: 0
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

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMS SQL Development > Date and Time Query


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway