-
created date
I checked there are objects created 14-FEB-2005. So I am trying to get all the objects created yesterday.
Select object_name from user_objects
where created = to_date('02/14/2005', 'mm/dd/yyyy');
But there is no row selectd.
Why? And how could I get the objects created yesterday?
THanks!
-
Are you serious? Think about it for a minute. Look at your data.
Jeff Hunter
-
Yes, I am serious! Please help!
-
What time is to_date('02/14/2005', 'mm/dd/yyyy')?
Jeff Hunter
-
Hint: the date column also has a time associated with it, which you cannot see because your default date format does not include it.
-
Please let me know! It's urgent for me! I always have problem with date.
Thanks!
-
I did:
select object_name from user_objects
where created = to_date('14-FEB-2005', 'DD-MON-YYYY HH24:MI');
no row selected.
-
Originally posted by lgaorcl
I did:
select object_name from user_objects
where created = to_date('14-FEB-2005', 'DD-MON-YYYY HH24:MI');
no row selected.
i) You need to go read the SQL Reference, and understand what a DATE data type is, as opposed to how it's presented in SQL*Plus.
ii) select to_char(object_name,'DD-MON-YYYY HH24:MI:SS') from user_objects
-
Originally posted by lgaorcl
Please let me know! It's urgent for me! I always have problem with date.
Since you don't understand what they are, I'm not surprised.
Jeff Hunter
-
Try this
select object_name from user_objects
where created > to_date('14-FEB-2005', 'DD-MON-YYYY HH24:MI')
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|