Re: Convert timestamp to date

From: Walt <walt_askier_at_YerBootsyahoo.com>
Date: Tue, 29 Mar 2005 18:17:07 -0500
Message-ID: <Tll2e.58$r6.24_at_news.itd.umich.edu>


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
//
//
Received on Wed Mar 30 2005 - 01:17:07 CEST

Original text of this message