Carter,
Try using a different Value Type:
For attributes with a value class of NSTimestamp, the following value
types are defined:
<none>—uses getObject on the java.sql.ResultSet object and setObject
on the java.sql.PreparedStatement object. It assumes the database can
provide a value compatible with a java.sql.Timestamp object.
D—java.util.Date uses setDate and getDate.
t—java.sql.Time uses getTime and setTime.
T—java.sql.Timestamp uses getTimestamp and setTimestamp.
M—use in place of D if using Microsoft SQL Server. Supports only
java.sql.Date.
As you can see a value type of "D" uses java.util.Date where I
typically use either "T" for java.sql.Timestamp or <none> depending
on the database type.
On Jan 23, 2007, at 8:59 AM, 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
______________________________________________________________________
______________
8:00? 8:25? 8:40? Find a flick in no time
with the Yahoo! Search movie showtime shortcut.
http://tools.search.yahoo.com/shortcuts/#news
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/robertwalker1%
40mac.com
This email sent to [EMAIL PROTECTED]
--
Robert Walker
[EMAIL PROTECTED]
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [email protected]