Unix Technical Forum

Format Date in database

This is a discussion on Format Date in database within the Oracle Database forums, part of the Database Server Software category; --> Hi, I need change the format of date in my database, my format is (dd-mm-yyyy) and i like (dd/mm/yyyy), ...


Go Back   Unix Technical Forum > Database Server Software > Oracle Database

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-24-2008, 11:01 AM
Jorge Rivero
 
Posts: n/a
Default Format Date in database

Hi,

I need change the format of date in my database, my format is
(dd-mm-yyyy) and i like (dd/mm/yyyy), thanks and sorry for my English.


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-24-2008, 11:01 AM
IANAL_VISTA
 
Posts: n/a
Default Re: Format Date in database

"Jorge Rivero" <jorgerivero@mi.cl> wrote in news:41d84151@news:

> Hi,
>
> I need change the format of date in my database, my format is
> (dd-mm-yyyy) and i like (dd/mm/yyyy), thanks and sorry for my English.


DATE data type is stored in the database without ANY format.

Some variation of the following should solve your problem.

alter session set nls_date_format='dd/mm/yyyy'
/
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-24-2008, 11:01 AM
Mark D Powell
 
Posts: n/a
Default Re: Format Date in database

I think mention of the to_char function which can be used to format the
date value into almost any desired output format is also in order

to_char(date_value.'format string')

and for input to the database see to_date(:variable,'format')

See the SQL manual for all the possible format options
HTH -- Mark D Powell --

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 05:54 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com