Exposition: I have an oracle database table with date format as 'mm/dd/yyyy' and an unique constraint that contains the date column. My issue is that I can't seem to find a method to change the internal date format, which I need to get down to the second (ie 'mm/dd/yyyy hh12:mi:ss'). I do NOT want to change the query of the output format, I want to change the stored value to be updated.
Question: Is it even possible to get the database precision down to the second? If so how, I assume its an update or alter command?
Best Answer
No you don't.. ;)
You have an Oracle database table with a date datatype. Period.
Any type of "format" is for display only, and is easily modified.
An Oracle
DATE
datatype holds Year + Month + Day + Hours + Minutes + Seconds information. It's up to you how to display/use it.Note that an Oracle
TIMESTAMP
datatype holds milliseconds in addition to what a DATE holds.It would be much easier to give you a more specific answer if you'd actually show your table definition, and your query and explain the problem you're having, and what you want to see.