Help need for setting date fields in Delivery entity

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Help need for setting date fields in Delivery entity

Cimballi
Hi,

I face a problem while try to set date fields in Delivery entity.
I set a date with an hour, I check before calling the store method
that the hour is well fixed in the entity, but after the call to the
store nethod, the date is set with an hour to 00:00.

Do you have an idea about what could be the problem or what I am doing wrong ?

The problem is not present in WebTools, here it works well, but I
think WebTools use another method than "store", not sure...

Thanks,

Cimballi
Reply | Threaded
Open this post in threaded view
|

Re: Help need for setting date fields in Delivery entity

Cimballi
Ok, I found the answer, this is because I use a java.util.Date which
is converted by OFBiz in a java.sql.Date which reset the hour field.
I suppose I should use a Timestamp object.

Is there any particular reason for which you use a java.sql.Date for
the conversion and not a Timestamp object ?

Cimballi


On Fri, Jun 5, 2009 at 1:56 PM, Cimballi<[hidden email]> wrote:

> Hi,
>
> I face a problem while try to set date fields in Delivery entity.
> I set a date with an hour, I check before calling the store method
> that the hour is well fixed in the entity, but after the call to the
> store nethod, the date is set with an hour to 00:00.
>
> Do you have an idea about what could be the problem or what I am doing wrong ?
>
> The problem is not present in WebTools, here it works well, but I
> think WebTools use another method than "store", not sure...
>
> Thanks,
>
> Cimballi
>