• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Oracle DATE field issue ...

 
Ranch Hand
Posts: 1585
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have a table with a DATE field which i want insert the current date into, is there a way to insert the current date with the following format : dd-mm-yyy as and example 03-08-2007 using sysdate ?

Thanks in advance ...
 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Vassili Vladimir:
Hi,

I have a table with a DATE field which i want insert the current date into, is there a way to insert the current date with the following format : dd-mm-yyy as and example 03-08-2007 using sysdate ?

Thanks in advance ...





Oracle uses a specific format for internal storage (RR date format). When a DATE is instantiated, it represents a day(say Jan 1 2004) ... the formats are applicable only when we want to represent this date in different ways. The way it is stored in the database is always the same.

Eg -While selecting data , we can use to_char function to get it in the dd-mm-yyyy format as shown below


Hope this helps
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic