Subject Re: Trigger to place date.
Author jerrypark12357
Thanks. That will work. The keyword is 'NOW'. I have the documentation
you advised. Somehow, couldn't find anything on setting a date, only
describing the date format.

--- In ib-support@y..., "William L. Thomson Jr." <support@o...> wrote:
> You could do it in a trigger, but I prefer to make a domain specifically
> for this.
>
> I call the domain DATE_NOW, it set it's base type to DATE and set the
> DEFAULT to 'NOW'.
>
> Not to sure off hand how to do that in a trigger, but I would imagine it
> to be similar.
>
> Then when I insert a new row the date is automatically put in there for
> me.
>
> Now I could see you wanting to do it with a trigger if you wanted the
> date to change each time a update or something was made.
>
> I would assume you would create a date var and set it's value to 'NOW'
>
> I believe it's covered in the docs that I use but you must download them
> and they are in pdf format. I have not found them on the web anywhere
> yet.
>
> Now I have a similar question for others, how can you add to a date?
>
> Say you have a date and you need to be able to add x number of days to
> the date. Any advice on that. I have not seen that covered in any docs
> so far. Or I have not read where that is covered in the docs I have.
>
> ftp://ftpc.inprise.com/pub/interbase/techpubs/ib_b60_doc.zip
>
> Hope that helps.
>
> On Wed, 2002-07-10 at 15:14, jerrypark12357 wrote:
> > I'm fairly new to Firebird/Interbase and am in the process of
> > designing a database. I couldn't find in the documentation a method of
> > creating a trigger to place the current date in a field. I understand
> > how to create triggers, just don't know how to do this particular one.
> >
> > NEW."posting_date" = [what];
> >
> > thanks
> >
> >
> >
> > To unsubscribe from this group, send an email to:
> > ib-support-unsubscribe@e...
> >
> >
> >
> > Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
> >
> >
> --
> Sincerely,
> William L. Thomson Jr.
> Support Group
> Obsidian-Studios Inc.
> 439 Amber Way
> Petaluma, Ca. 94952
> Phone 707.766.9509
> Fax 707.766.8989
> http://www.obsidian-studios.com