• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

Oracle DATE field issue ...

 
Ranch Hand
Posts: 1585
  • Mark post as helpful
  • send pies
  • 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
  • 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
 
He puts the "turd" in "saturday". Speaking of which, have you smelled this tiny ad?
professionally read, modify and write PDF files from Java
https://products.aspose.com/pdf/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!