Hi, i have a variable "pippo" type java.util.Date formatted like (dd-MM-YYYY hh:mm:ss)
and I want insert in my Database where the field is Date type(oracle.jbo.domain.Date)
in the same format(dd-MM-YYYY hh:mm:ss).
I try to convert "pippo" but the result is formatted(dd-MM-YYYY hh:mm:ss).
Thank's a lot yours time and i'm very sorry for my easy english
Here is what i have seen that works , but does not preserve milliseconds. Does anyone have other solution? Using dateValue() looses hours, mins and seconds.
public oracle.jbo.domain.Date toJboDate(java.util.Date pJavaDate)
{
return new oracle.jbo.domain.Date(new Timestamp(pJavaDate.getTime()));
}
public java.util.Date toJavaDate(oracle.jbo.domain.Date pJboDate)
{
return new Date(pJboDate.timestampValue().getTime());
}
I have tried your steps but it still storing only the date value and leaving the timestamp. Can you tell me how can I fix this issue? I want to store the user submitted date/time in the database table.
Hi,
how are you looking onto the DB column? if you are using SQLDeveloper you are looking at NLS converted values. You have to change the way SQLDeveloper displays DATE Columns via Tools->preferences->Database->NLSParameters.