Re: Question

From: Aparna <bliss_is_ignorance_at_hotmail.com>
Date: Tue, 1 May 2001 18:34:12 +0800
Message-ID: <3aeeb6b7.0_at_news.tm.net.my>


hi katie,

to get the first day of the month use the following

select trunc (add_months (sysdate, 2), 'mm') from dual;

the parameter 2 to add_months to the add 2 months to the system date and then the trunc () with 'mm' as parameter will truncate the date to the 1st of the month... so suppose the date is 12-apr-2001 the result will be 01-jun-2001 and similarly if the date is 22-apr-2001 (i.e. any date after 15th) the result will still be 01-jun-2001... u can similarly use the round ()...

hope this helps...

regards,
aparna

"André Gamache" <andre.gamache_at_sympatico.ca> wrote in message news:3AEC07A8.BB9E8034_at_sympatico.ca...
> Hi Katie,
>
> One way to do that is to use a form trigger. Before entering the block or
 the
> form, a trigger can be triggered and it can do the job.
>
> I know the t you can also do the same using the porperty list.
>
>
>
>
> The McCrays wrote:
>
> > I posted a question yesterday, but I need to revise it a little.
> >
> > I'm working on a college project, and can't find the answer to this
 anywhere
> > in my text, so I apologize for such a basic question!!
> >
> > When the data entry person opens a particular form, I need a date field
 to
> > be automatically set for the system date + 2 months, but in addition the
 day
> > needs to always be set to the 1st of that month. So, if todays date is
> > April, 28,2001, the date field should read June, 1, 2001.
> >
> > I currently am using add_months(sysdate,2) as the formula for the
 attribute.
> > Now, what do I add to set the day to 1?
> >
> > Thanks again for any help.
> >
> > Katie
>
Received on Tue May 01 2001 - 12:34:12 CEST

Original text of this message