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 > Oracle > Migrating DATETIME to Oracle

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-19-06, 04:38
dvtdbd dvtdbd is offline
Registered User
 
Join Date: Feb 2005
Location: Barcelona
Posts: 42
Question Migrating DATETIME to Oracle



I would like to know how next Infomix SPL sentence would be in
Oracle PL/SQL:

LET m_diaini = DATETIME(00:00) HOUR TO MINUTE;

Thanks.


Reply With Quote
  #2 (permalink)  
Old 01-19-06, 09:01
ss659 ss659 is offline
Registered User
 
Join Date: Jan 2004
Posts: 492
Give an example with an exact time - what would the output of that be in Informix?

Off the top of my head, my guess would be:

Code:
m_diani := to_char(sysdate, 'HH24:MI'); --24 hour clock
m_diani := to_char(sysdate, 'HH:MI PM'); --12 hour AM/PM clock
__________________
Oracle OCPI (Certified Practicing Idiot)
Reply With Quote
  #3 (permalink)  
Old 01-21-06, 11:39
WilliamR WilliamR is offline
Registered User
 
Join Date: Sep 2004
Location: London, UK
Posts: 564
If you want to declare a DATE variable in Oracle and initialise it to today's date at 00:00:00, then perhaps

DECLARE
v_diani DATE := TRUNC(SYSDATE);
Reply With Quote
  #4 (permalink)  
Old 01-22-06, 11:22
JMartinez JMartinez is offline
Registered User
 
Join Date: May 2004
Location: Dominican Republic
Posts: 719
Isn't that more likely an INTERVAL '00:00' HOUR TO MINUTE datatype ?
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