iNET Interactive - Online Advertising Agency
          
Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > Database and Reporting > Oracle Date format.


Reply
 
Thread Tools Display Modes
  #1  
Old 07-21-2003, 01:25 AM
carnation's Avatar
carnation carnation is offline
Junior Contributor
 
Join Date: Apr 2003
Posts: 268
Default Oracle Date format.

When I use PlSQL to select Date data, I always get the data with "dd-mon-yyyy" format. But I want to display data with "dd/mm/yyyy" format.
How can I do that.
Thanks for help.
Reply With Quote
  #2  
Old 07-21-2003, 02:24 AM
Shurik12 Shurik12 is offline
Steppe Walker
Retired Moderator
* Expert *
 
Join Date: Jul 2002
Location: Ukraine/Russia/Belgium
Posts: 7,227
Default

Quote:
Originally Posted by carnation
When I use PlSQL to select Date data, I always get the data with "dd-mon-yyyy" format. But I want to display data with "dd/mm/yyyy" format.
How can I do that.
Thanks for help.



Hi,

Try

To_Date( 'What_you_wan_to_convert', 'dd/mm/yyyy')


Shurik.
Reply With Quote
  #3  
Old 07-21-2003, 08:05 PM
carnation's Avatar
carnation carnation is offline
Junior Contributor
 
Join Date: Apr 2003
Posts: 268
Default

Is there anywhere in Oracle allow us to set the date format?
Reply With Quote
  #4  
Old 07-21-2003, 09:09 PM
alimo alimo is offline
Newcomer
 
Join Date: Jul 2003
Posts: 16
Default

Quote:
Originally Posted by carnation
Is there anywhere in Oracle allow us to set the date format?


YES AT SESSION LEVEL:=

ALTER SESSION
SET NLS_DATE_FORMAT = 'DD/MM/YYYY'

HOPE IT HELPS
Reply With Quote
  #5  
Old 07-22-2003, 02:07 AM
Kashif's Avatar
Kashif Kashif is offline
Junior Contributor
 
Join Date: Aug 2002
Location: PAKISTAN
Posts: 341
Default

there is an othere method to Set its Date Fomat.

Open Regedit. and open this Key

HK_LOCAL_MACHINE>SOFTWARE>ORACLE
Create a new Key and rename to NLS_DATE_FORMAT

then Modyfy its Value DD/MM/YYYY

it will change the Date Format just for Oracle. you dont have to need to Set its format at every Session.....
__________________
Regards,
Kashif

There are too many Question that looks Odd
But it helps more to Learn
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Crystal Reports Date Format Big Boabby Database and Reporting 9 03-19-2003 09:42 AM
Please help me to displa the date in Msh Flex Grid always in dd/mm/yyyy format vikaspa Interface and Graphics 1 12-11-2002 03:26 AM
Oracle Date in Excel tstbuddy Word, PowerPoint, Outlook, and Other Office Products 10 06-11-2002 08:10 AM
System Date Format Bhaskara Varma General 3 06-07-2002 02:59 AM
comparing dates with visual foxpro and ado azwaan General 8 01-08-2002 05:50 AM

Advertisement: