1 Reply Latest reply on Sep 21, 2011 10:38 AM by philmodjunk

    Insert Current Date

    Syfy

      Title

      Insert Current Date

      Post

      Anybody can help please..

      How to create a script upon opening my database it will automatically display current date in date edit box (enrollment details). Likewise, during data entry upon pressing new contact button automatically display current date in date edit box. Thanks and God Bless.

      date_insert.png

        • 1. Re: Insert Current Date
          philmodjunk

          I gather that while this field will display the current date, you may need to edit it to specify a different date?

          In Manage | Database | Fields, find this Date field and double click it to bring up Field Options. Select the auto-enter Tab. Select the creation date option. With this option, each new record will start with the current date in the date field.

          To automatically display the date on a layout where you do not need the date to be in an editable field, you can just add the characters // to your layout and filemaker will insert the current date each time you enter that layout. You can also do this by selecting "Current Date" from the insert menu while you are in layout mode.

          That may be all you need when you ask for this:

          upon opening my database it will automatically display current date in date edit box (enrollment details)

          If you truly need this in a field, a script set to run when the file is opened (see File Options in the File menu) can use set field to enter the current date, but I can't really recommend that you do that without knowing more about how you will use the date in this field. In some circumstances, such a script might create real problems for your database.