Hi,
Thanks for the reply.
I didn't understand what you ment :
TO_CHAR(SYSDATE,'DD
-------------------
22-05-2007 10:52:59
If i write - select.....DATEADD FROM.... without the TO_CHAR(sysdate,'dd-mm-yyy
I don't get DISTINCT rows which mean that the select statment
see 15/05/2007 09:56:34 and
15/05/2007 09:56:45
as different rows. (this is where my problem beggins - if there are 2 or more rows with the same date (even if there is a different hour, then the select statment must take only 1 row. after that i need to cast it to string.)
but if i wrote - TO_CHAR(DATEADD, 'dd/mm/yyyy') from USERS
it works fine but i can't cast it to string in my code.
Maybe do you have some idea? (maybe i should change the select statment....)
Main Topics
Browse All Topics





by: schwertnerPosted on 2007-05-22 at 00:37:12ID: 19132207
Oracle automatically converts dates to strings, but without the time component:
y hh:mi:ss') from dual;
SQL> select sysdate from dual;
SYSDATE
---------
22-MAY-07
SQL> select TO_CHAR(sysdate,'dd-mm-yyy
TO_CHAR(SYSDATE,'DD
-------------------
22-05-2007 10:52:59
SQL>