You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Pierre Smits <pi...@gmail.com> on 2010/08/26 13:21:13 UTC

date fields

Hi All,

How can I get in a date field the date of the first day of current month?
And in a second field the date of the last day of current month?

Regards,

Pierre

Re: date fields

Posted by "joelfradkin@gmail.com" <jo...@gmail.com>.
        <field name="FromDate" title="From Day (including unless time is
set)" >
            <date-time default-value="${groovy:
org.ofbiz.base.util.UtilDateTime.getMonthStart(org.ofbiz.base.util.UtilDateTime.nowTimestamp())}"/>
        </field>

There is a getMonthEnd  but not sure how to set timezone and locale.
        org.ofbiz.base.util.UtilDateTime.getMonthEnd(stamp, timeZone,
locale)



-----
Joel Fradkin
--
View this message in context: http://ofbiz.135035.n4.nabble.com/date-fields-tp2339580p4657262.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Re: date fields

Posted by Brajesh Patel <br...@gmail.com>.
hi Pierre,
GlAccountTrialBalance.groovy example using start of day at line 69.



On Thu, Aug 26, 2010 at 4:51 PM, Pierre Smits <pi...@gmail.com>wrote:

> Hi All,
>
> How can I get in a date field the date of the first day of current month?
> And in a second field the date of the last day of current month?
>
> Regards,
>
> Pierre
>



-- 
Thanks
Brajesh Patel

HotWax Media
http://www.hotwaxmedia.com

Re: date fields

Posted by Adrian Crum <ad...@yahoo.com>.
There is even an example of that in the Example component - using start of day I believe.

-Adrian

--- On Thu, 8/26/10, Nicolas Malin <ma...@librenberry.net> wrote:

> From: Nicolas Malin <ma...@librenberry.net>
> Subject: Re: date fields
> To: user@ofbiz.apache.org
> Date: Thursday, August 26, 2010, 4:51 AM
> Use UtilDateTime.getMonthStart on
> getMonthEnd function with 
> nowTimestamps present in context
> 
> Nicolas
> 
> Pierre Smits a écrit :
> > My apologies, I have to clarify.
> >
> > I meant setting the default values of the date fields
> to either the first
> > day or the last day of the current month...
> >
> > Regards,
> >
> > Pierre
> >
> > 2010/8/26 Pierre Smits <pi...@gmail.com>
> >
> >   
> >> Hi All,
> >>
> >> How can I get in a date field the date of the
> first day of current month?
> >> And in a second field the date of the last day of
> current month?
> >>
> >> Regards,
> >>
> >> Pierre
> >>
> >>     
> >
> >   
> 
> 


      

Re: date fields

Posted by Nicolas Malin <ma...@librenberry.net>.
Use UtilDateTime.getMonthStart on getMonthEnd function with 
nowTimestamps present in context

Nicolas

Pierre Smits a écrit :
> My apologies, I have to clarify.
>
> I meant setting the default values of the date fields to either the first
> day or the last day of the current month...
>
> Regards,
>
> Pierre
>
> 2010/8/26 Pierre Smits <pi...@gmail.com>
>
>   
>> Hi All,
>>
>> How can I get in a date field the date of the first day of current month?
>> And in a second field the date of the last day of current month?
>>
>> Regards,
>>
>> Pierre
>>
>>     
>
>   


Re: date fields

Posted by Pierre Smits <pi...@gmail.com>.
My apologies, I have to clarify.

I meant setting the default values of the date fields to either the first
day or the last day of the current month...

Regards,

Pierre

2010/8/26 Pierre Smits <pi...@gmail.com>

> Hi All,
>
> How can I get in a date field the date of the first day of current month?
> And in a second field the date of the last day of current month?
>
> Regards,
>
> Pierre
>