• 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
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

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
 
We don't have time to be charming! Quick, read this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic