954,561 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Change date format

How do i change date format in the database

mod
Newbie Poster
2 posts since Apr 2006
Reputation Points: 10
Solved Threads: 0
 
How do i change date format in the database


Take a look at the TO_CHAR function

Read more here

aniseed
Posting Whiz
359 posts since Apr 2006
Reputation Points: 48
Solved Threads: 7
 

Take a look at the TO_CHAR function

Read more here


Thanks for your reply the problem is solved

mod
Newbie Poster
2 posts since Apr 2006
Reputation Points: 10
Solved Threads: 0
 

To change date type use to_char() function.

rbirnale
Newbie Poster
2 posts since May 2007
Reputation Points: 10
Solved Threads: 0
 

ALTER SESSION set NLS_DATE_FORMAT = 'DD/MM/YYYY';

PLEASE USE THE ABOVE CODE

debasisdas
Posting Genius
6,872 posts since Feb 2007
Reputation Points: 666
Solved Threads: 434
 

The Alter session is a temporary solution, that makes your session only appears with the format specified..
If you want to create a report or a query or a script that always appear with a specific format then go with TO_CHAR()

Musta
Newbie Poster
6 posts since Aug 2007
Reputation Points: 10
Solved Threads: 0
 

Use To_char Function
To_char(date,'dd-mm-yyyy') In Which Format You Use
Also To_date Function
To_date(date,'dd-mm-yyyy')
Also
To_char(to_date(date,'dd-mm-yyyy'),'dd-mm-yyyy'))

yogesh_vaidya12
Newbie Poster
12 posts since Oct 2007
Reputation Points: 10
Solved Threads: 1
 

Can Any one tell how to convert String datatype 2 sql

dhineshbcs
Newbie Poster
2 posts since Feb 2012
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You