Home » SQL & PL/SQL » SQL & PL/SQL » problem in date?
problem in date? [message #326675] Thu, 12 June 2008 04:12 Go to next message
tondapi
Messages: 99
Registered: August 2007
Location: usa
Member
Hi,

In my data base date is like 01-jan-2008 12:00:00:00.
But i want to show only date i.e. 01-jan-2008.
whw can i do it.Any one help me.
Re: problem in date? [message #326678 is a reply to message #326675] Thu, 12 June 2008 04:18 Go to previous messageGo to next message
sarwagya
Messages: 87
Registered: February 2008
Location: Republic of Nepal
Member
use TO_CHAR(date_column,'DD-Mon-YYYY')
Re: problem in date? [message #326679 is a reply to message #326675] Thu, 12 June 2008 04:20 Go to previous messageGo to next message
S.Rajaram
Messages: 1027
Registered: October 2006
Location: United Kingdom
Senior Member
Check this link.

http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/functions230.htm#i1002084

Regards

Raj
Re: problem in date? [message #326725 is a reply to message #326675] Thu, 12 June 2008 07:56 Go to previous messageGo to next message
joy_division
Messages: 4642
Registered: February 2005
Location: East Coast USA
Senior Member
tondapi wrote on Thu, 12 June 2008 05:12
Hi,

In my data base date is like 01-jan-2008 12:00:00:00.



Incorrect. DATE is not stored in any format. It is "displayed" in a format. Search the posted link, and you might want to have a look at the Oracle Concepts manual.
Re: problem in date? [message #326729 is a reply to message #326725] Thu, 12 June 2008 08:05 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
You're letting your incurable optimism get the better of you.

Theres at least a 10% chance that they're storing the date in a varchar2(23)
Re: problem in date? [message #326730 is a reply to message #326729] Thu, 12 June 2008 08:06 Go to previous message
joy_division
Messages: 4642
Registered: February 2005
Location: East Coast USA
Senior Member
Correct! I didn't even think about that. It's the old assumption on my part due to the lack of information in the posting.
Previous Topic: Timestamp value with US Time zone.
Next Topic: Schema
Goto Forum:
  


Current Time: Thu Dec 08 06:14:31 CST 2016

Total time taken to generate the page: 0.25954 seconds