If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > DATETIME to INTEGER

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-14-11, 09:36
Socke Socke is offline
Registered User
 
Join Date: Dec 2011
Posts: 7
DATETIME to INTEGER

Hi,
i have a timestamp in the sysmaster Table.

Code:
 SELECT connected FROM sysmaster:syssessions;
connected is a INTEGER (timestamp like 1323872928).

How i can convert it to a Datetime? Because i need a WHERE with CURRENT.

Like

Code:
SELECT connected FROM sysmaster:syssessions WHERE connected = is older then one day
Sorry for my english
Reply With Quote
  #2 (permalink)  
Old 12-14-11, 20:33
domusonline domusonline is offline
Registered User
 
Join Date: Nov 2010
Posts: 12
That "timestamp" is a unix timestamp format. Do this:

SELECT DBINFO('utc_to_datetime',connected ) FROM ...

Daylight savings time can possibly make a difference... not sure.
Regards
Reply With Quote
  #3 (permalink)  
Old 12-15-11, 03:07
Socke Socke is offline
Registered User
 
Join Date: Dec 2011
Posts: 7
It works !!!

Big thanks.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On