469,588 Members | 2,841 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,588 developers. It's quick & easy.

Convert timestamp to date

Bob
Trying to convert timestamp data to date data (without the time in
hours/mins/secs), does only seem to work with TO_DATE(mydate; 'yyyymmdd').

But I do not want a string, but a real date like 29-03-2005.

How do I get it like that?

Thanks,
Bob
Jul 19 '05 #1
1 59445
Bob wrote:
Trying to convert timestamp data to date data (without the time in
hours/mins/secs), does only seem to work with TO_DATE(mydate; 'yyyymmdd').

But I do not want a string, but a real date like 29-03-2005.

How do I get it like that?


1) try the trunc function, i.e. "select trunc(sysdate) from dual;"

2) try re-converting your string back to a date, i.e.
"select to_date(to_char(mydate,fmt1),fmt2) from dual;"
using appropriate format strings for fmt1 and fmt2.

3) Or maybe I don't really understand what you're trying to do. What do
you mean by "timestamp data" as opposed to "date data"?

--
//-Walt
//
//

Jul 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Sugapablo | last post: by
10 posts views Thread by satishrajana | last post: by
5 posts views Thread by whitsey | last post: by
4 posts views Thread by skulkrinbait | last post: by
1 post views Thread by Bob | last post: by
reply views Thread by suresh191 | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.