• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Display Correct Date and Time from Oracle DB
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Display Correct Date and Time from Oracle DB


  • Subject: Re: Display Correct Date and Time from Oracle DB
  • From: shaun <email@hidden>
  • Date: Wed, 24 Jan 2007 12:09:31 +1030

Hi,

Carter Wojcik wrote:
Hi All -

I have reversed engineered my model from an Oracle 10g
db.  Most of the entities have date added and date
updated attributes (containing both date and time
pieces).  I would like to display both the date and
time to the user (example: 22 Jan 2007 14:24).

Here is the information from the models plist:
columnName = "DATE_ADDED"; externalType = DATE; name = dateAdded; valueClassName = NSTimestamp; valueType = D;


The columns are of type DATE in the database.

I am able to get the day, month, year to display
correctly using the supplied dateformat attribute in
wostring.  Then when I want to just display the time
portion, midnight (00:00 or 12:00 AM) is displayed
even though there is an actual time in the database.

Thanks for any help/pointers.

Carter

Have a quick read of this document regarding oracle dates and times. You might need the following to get the correct behaviour when updating DATE(date & time) attributes using EOF as well as setting the valueType = T.


java -Doracle.jdbc.V8Compatibility="true" MyApp

http://www.oracle.com/technology/tech/java/sqlj_jdbc/htdocs/jdbc_faq.htm#08_01

I have been using oracle 10g in a dev environment for about 6 months or so with data imported from an oracle 8i database.

I found that I needed to use the V8Compatibility arg above and to make sure that valueType = T was set for NSTimestamps which mapped to oracle DATE attributes containing date & time information otherwise updates failed.

You might want to ensure you have the correct drivers aswell.
Oracle jdbc drivers:
http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/htdocs/jdbc_10201.html

regards,
 - shaun
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Display Correct Date and Time from Oracle DB (From: Carter Wojcik <email@hidden>)

  • Prev by Date: Fwd: WebObjects 5.3 Licensing Question (Again)
  • Next by Date: WebObjects user group in Mexico City
  • Previous by thread: Re: Display Correct Date and Time from Oracle DB
  • Next by thread: WOActionURL and AJAX
  • Index(es):
    • Date
    • Thread