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 > Timestamp,

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-13-10, 13:26
Beebo Beebo is offline
Registered User
 
Join Date: May 2009
Posts: 19
Timestamp,

Guys,

Is there any way to hard code a timestamp (specifically the time HRMMSS) as a field into a query? Of course I have fields that are date type format, but not datetime. That's why I ask. I know you can do this in excel, but I need to do it in my query within InformiX.
Reply With Quote
  #2 (permalink)  
Old 01-14-10, 08:04
bigcalm bigcalm is offline
Registered User
 
Join Date: Jul 2009
Posts: 37
Hmm, not sure what you want here, but....

to define a field as a timestamp....

despatch_time datetime year to second

(or, perhaps a little simpler).

despatch_time datetime hour to second

....

When you select from the table and what to put criteria on it, you must use the datetime format specfied within the table.

First definition (datetime year to second)...

select ??? from ??? where despatch_time >= "2009-01-23 00:00:00"

Second definition (datetime hour to second)...

select ??? from ??? where despatch_time >= "16:45:00"

....

I *think* the default for datetimes is datetime year to fraction(4), but not 100% sure on that.
Reply With Quote
Reply

Thread Tools
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