home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.databases.oracle      Overblown overpriced overengineered SHIT      2,288 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 2,062 of 2,288   
   Walt to Bob   
   Re: Convert timestamp to date   
   29 Mar 05 18:17:07   
   
   From: walt_askier@YerBootsyahoo.com   
      
   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   
   //   
   //   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca