Home » RDBMS Server » Server Administration » Storing Different Date Types
Storing Different Date Types [message #50250] Thu, 07 March 2002 07:42 Go to next message
BritDev
Messages: 1
Registered: March 2002
Junior Member
is there a way to store dates with only the YEAR such as '2002' as well as the regular type 'mm-dd-yyyy' in a DATE field for 8i.

Thanks.
Re: Storing Different Date Types [message #50254 is a reply to message #50250] Thu, 07 March 2002 11:04 Go to previous messageGo to next message
Suresh Vemulapalli
Messages: 624
Registered: August 2000
Senior Member
no,use varchar2 datatype
Re: Storing Different Date Types [message #50258 is a reply to message #50250] Thu, 07 March 2002 11:12 Go to previous message
saleem
Messages: 65
Registered: January 2002
Member
Oracle always saves date information in date columns as dd-mon-yy hh:mi:ss no matter what format you save it as. you can extract only the year if you want by using to_char(column_name,'YY'). but if you want just the two digits to exist in the actualy column then you need to create a separate column of either char/varchar2/number and use that to store the two digit year.
Previous Topic: How to list all fields in JDBC
Next Topic: Re: Solve these questions, please
Goto Forum:
  


Current Time: Tue Dec 24 20:10:23 CST 2024