1 Reply Latest reply on Sep 23, 2008 12:39 PM by jamesjmp

    Rich calendar component and longs

    ericjava.eric.chiralsoftware.net

      Quick question: All my entities which store dates, do so as longs (representing number of milliseconds).  This is a better way to store time than using the venerable java.util.Date class.  Unfortunately the rich calendar component wants a java.util.Date as its value.  Is there some way to change that?  Really the component should be able to take a Long as its value.  I looked at using a converter, but that's not the right thing to use for this.

        • 1. Re: Rich calendar component and longs

          I guess this is due to the fact that as databases have a type for dates or dateTimes this is the default type for this info. I use them and sometimes features provided by dates (in sql or java are really useful). Seam gean generates that Pojos with that properties as java.util.date.
          AFAIK there is no way to assign it directly to a Long and you should define a Date type variable and then use yourdate.getTime(), that returns you the value in miliseconds since 1970, to set your property.
          I agree with you that it would be useful to be able to define which of the two data type you would like to work with.
          regards!