How Get Month and year Value for View-entity ?

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

How Get Month and year Value for View-entity ?

kiunx
Hi there,
i want to ask something about View Entity,
can i get the month or year value from 1 column that contai date?
for example
theDate is the column contain date data.
TheMonthIs is the month value from theDate and TheYearIs is the year value from theDate.

=======================================
=  theDate     = TheMonthIs =       TheYearIs        =
=======================================
- 29-02-2012  |       02       |             2012         |
--------------------------------------------------
- 03-03-2012  |       03       |             2012         |
=======================================


thanks and regards,


Willy
Reply | Threaded
Open this post in threaded view
|

Re: How Get Month and year Value for View-entity ?

Rishi Solanki
UtilDateTime.getMonth() and UtilDateTime.getYear are methods have the same
purpose.
- MonthSelection.groovy

For any other format like month name etc, you will find the utility methods
in the same class.

--
Rishi Solanki
Manager, Enterprise Software Development
HotWax Media Pvt. Ltd.
Direct: +91-9893287847
http://www.hotwaxmedia.com


On Mon, Mar 12, 2012 at 4:27 PM, kiunx <[hidden email]> wrote:

> Hi there,
> i want to ask something about View Entity,
> can i get the month or year value from 1 column that contai date?
> for example
> theDate is the column contain date data.
> TheMonthIs is the month value from theDate and TheYearIs is the year value
> from theDate.
>
> =======================================
> =  theDate     = TheMonthIs =       TheYearIs        =
> =======================================
> - 29-02-2012  |       02       |             2012         |
> --------------------------------------------------
> - 03-03-2012  |       03       |             2012         |
> =======================================
>
>
> thanks and regards,
>
>
> Willy
>
> --
> View this message in context:
> http://ofbiz.135035.n4.nabble.com/How-Get-Month-and-year-Value-for-View-entity-tp4465783p4465783.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>
Reply | Threaded
Open this post in threaded view
|

Re: How Get Month and year Value for View-entity ?

Anne Jessel
In reply to this post by kiunx
You might be able to use complex-alias, though I haven't tried it myself.
Have a look at the documentation included in the entitymodel schema.

Cheers,
Anne.

On 12 March 2012 21:57, kiunx <[hidden email]> wrote:

> Hi there,
> i want to ask something about View Entity,
> can i get the month or year value from 1 column that contai date?
> for example
> theDate is the column contain date data.
> TheMonthIs is the month value from theDate and TheYearIs is the year value
> from theDate.
>
> =======================================
> =  theDate     = TheMonthIs =       TheYearIs        =
> =======================================
> - 29-02-2012  |       02       |             2012         |
> --------------------------------------------------
> - 03-03-2012  |       03       |             2012         |
> =======================================
>
>
> thanks and regards,
>
>
> Willy
>
> --
> View this message in context:
> http://ofbiz.135035.n4.nabble.com/How-Get-Month-and-year-Value-for-View-entity-tp4465783p4465783.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>



--
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Phone: (03) 9585 6788
Fax: (03) 9585 1086
Web: http://www.cohsoft.com.au/
Email: [hidden email]

Bonsai ERP, the all-inclusive ERP system
http://www.bonsaierp.com.au/