Home » RDBMS Server » Server Administration » Re: Data formats
Re: Data formats [message #373321] Wed, 11 April 2001 10:24 Go to next message
Neal Hawman
Messages: 14
Registered: April 2001
Junior Member
You're using to_date, so Oracle will convert it into a proper date format. It will then be displayed in a utility such as SQLPLUS in whatever the default format for displaying dates is. This is defined by the parameter NLS_DATE_FORMAT and is usually 'DD-MON-YY'.

I presume that wwv_thingattributes.value is of character type. If you want to display it in the same format as it was in the original table, then you don't need TO_DATE in the select clause (although you will need it in the order by clause so that the sorting is correct).

Neal
Re: Data formats [message #373322 is a reply to message #373321] Wed, 11 April 2001 10:39 Go to previous messageGo to next message
Damon
Messages: 7
Registered: April 2001
Junior Member
and why i need to do that?-i've wrote in the statement to_date(wwv_thingattirbutes.value,'dd.mm.yy') so that means that data in the view will be in dd-mm-yy format...right???
and how to change default format from dd-mon-yy to dd-mm-yy?
And yes you're quite right wwv_thingattributes.value is of varchar2 type
Re: Data formats [message #373323 is a reply to message #373322] Wed, 11 April 2001 10:46 Go to previous message
Neal Hawman
Messages: 14
Registered: April 2001
Junior Member
Try applying a to_char to the to_date i.e.

select to_char(
to_date(wwv_thingattributes.value,'dd.mm.yy'),
'dd-mm-yy'))
...
Previous Topic: Re: Data formats
Next Topic: Re: Data formats
Goto Forum:
  


Current Time: Mon Jul 01 16:12:44 CDT 2024