Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Return minutes as date datatype

Re: Return minutes as date datatype

From: Mark C. Stock <mcstockX_at_Xenquery>
Date: Thu, 22 Jul 2004 07:53:05 -0400
Message-ID: <Io6dnXP3TbhvN2LdRVn-oQ@comcast.com>

"Joel Garry" <joel-garry_at_home.com> wrote in message news:91884734.0407211626.83eb581_at_posting.google.com...
| "Mark C. Stock" <mcstockX_at_Xenquery .com> wrote in message
news:<G-CdnTYoOqwZL2PdRVn-ug_at_comcast.com>...
| > paul, dates is dates -- if you have a date datatype, it will always have
a
| > date and a time element
| >
| > so, there is no way to return a date datatype that does not include a
date
| > element
| >
| > your best shot is to revamp your generic tool to handle time values
| > (returned as number, but perhaps returned as INTERVAL DAY if Access ADO
can
| > handle that)
| >
|
| Am I missing something?
|
| 1* select To_Char(sysdate,'HH24MI') from dual
| SQL> /
|
| TO_C
| ----
| 1725
|
| Seems numeric enough to me?
|

yes, you are missing that the OP wants the value returned as a DATE datatype with no date element -- your expression returns a character datatype, which his generic interface is handling with comparison operators that are not appropriate to what he wants to accomplish

SQL> select

  2   dump(sysdate)
  3  ,dump(to_char(sysdate,'hh24mi'))
  4  ,dump(to_number(to_char(sysdate,'hh24mi')))
  5 from dual
  6 /

DUMP(SYSDATE)



DUMP(TO_CHAR(SYSDATE,'HH24MI'))

DUMP(TO_NUMBER(TO_CHAR(SYSDATE,'HH24MI')))
Typ=13 Len=8: 212,7,7,22,7,51,34,0
Typ=1 Len=4: 48,55,53,49
Typ=2 Len=3: 194,8,52

++ mcs Received on Thu Jul 22 2004 - 06:53:05 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US