• 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
  • Devaka Cooray
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Jeanne Boyarsky
  • Tim Cooke
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
Bartenders:

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
 
Eliminate 95% of the weeds in your lawn by mowing 3 inches or higher. Then plant tiny ads:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic