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 > Other > Using date and time in progress.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-13-04, 14:21
Marisa Marisa is offline
Registered User
 
Join Date: Sep 2003
Posts: 5
Using date and time in progress.

Hi, I am not a progress expert and I need to access progress from a dts package from sql server and get some data from a progress table.
I use this query to obtain all rows where the date is today and the time is two hours ago.

select col1, col2, col3, col4, col5, col6
from pub.journal
where to_char(datecol, 'yyyy-mm-dd hh:mi:ss') >= to_char(sysdate, 'yyyy-mm-dd') + ' ' + to_char(systime -7200000, 'hh:mi:ss')

It works fine, but at midnight it fails because the systime is 00:00:00 or 01:00:00 and the value that the substract returns is not a valid hour.

What do you recommend me to do to fix this problem??
Do you know another way i can do this??

I will appreciate a lot your help.
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