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 > To_Date function

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-01-09, 10:28
jahangeer jahangeer is offline
Registered User
 
Join Date: Apr 2009
Posts: 1
Post To_Date function

hi,

I am new to Informix, i need to show list of records for given period of time.

15-03-2009 07:00 to 20-03-2009 18:00

In the table A, 2 columns (sdate: date stime: datetime HOUR to MINUTE ) for storing date and time.

i am having 3 query for this,

select * from A where sdate between('15-03-2009' and '20-03-2009') and stime between('07:00' and '18:00').


select * from A where to_date(sdate || stime) between ('15-03-2009 07:00' and '220-03-2009 18:00')

select * from A where id in (select id from A where sdate between('15-03-2009' and '20-03-2009')) and stime between('07:00' and '18:00')

Kindly provide a query if this will not work out, that would be very great full .


Thanks
Jahangeer
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