[OFBiz] Dev - Date Time fields.
Si Chen
schen at graciousstyle.com
Fri Jul 1 16:46:34 EDT 2005
You might be able to do it with a view-entity off your original entity.
They allow you to do quite an amazing number of things.
Mark Gordon wrote:
> Thanks for the response. I think I am going to create another field
> in the table that is the date and keep the other field as the time.
> It is redundant but then I can easily do a group by.
>
> I was just wondering if there was a way to easily call functions
> within the entity engine framework. I guess it would be difficult to
> maintain database independence as each db has different functions for
> the same functionality.
>
> Thanks and have a good weekend!
>
> -mark
>
>
> Si Chen wrote:
>
>> If the field is a java.sql.Timestamp, you can convert it to a
>> java.sql.Date. Would that fit your needs? Or you can change the way
>> it is displayed in freemarker to show only the date portion.
>>
>> Mark Gordon wrote:
>>
>>> Hello All,
>>>
>>> I have a quick question.
>>>
>>> Is it possible to select just the date portion of a date-time field
>>> within the entity engine?
>>>
>>> An example postgres query would be:
>>>
>>> select *, date_trunc('day', event_time) from work_event
>>>
>>> I would like to be able to group by on this field.
>>>
>>>
>>> Thanks,
>>>
>>> mark
>>>
>>>
>>> _______________________________________________
>>> Dev mailing list
>>> Dev at lists.ofbiz.org
>>> http://lists.ofbiz.org/mailman/listinfo/dev
>>>
>>
>> _______________________________________________
>> Dev mailing list
>> Dev at lists.ofbiz.org
>> http://lists.ofbiz.org/mailman/listinfo/dev
>>
>
>
> _______________________________________________
> Dev mailing list
> Dev at lists.ofbiz.org
> http://lists.ofbiz.org/mailman/listinfo/dev
>
More information about the Dev
mailing list