DumontEXE 0.0.1
The (-Date-) Keyword

The (-Date-) Keyword is one of those keywords that has changed in function over time within Commence. In the early days, the (-Date-) keyword would yeild a value that was easily used in agents when filling out field date values automatically. It was also especially handy when making sequential backups and you wanted the date-stamp in the back-up file name. However, the functionality changed and some of those features have been lost. Here is the official word from Commence Corp:

   The (-Date-) keyword has been enhanced to retrieve the Long 
    Date format from Control Panel Regional Settings Applies to: 
    Commence RM 3.5.1

 More Information:
  In previous versions of the software, the (-Date-) keyword used to 
   return a Long Date string constructed by Commence in Month Day Year 
   format. In order to better support international users, the latest 
   version of Commence now respects the Long Date format set using the 
   Windows Control Panel under Regional Settings.

  The (-Date-) keyword can be used in text letter templates and various 
   other areas of the product. It returns a value equivalent to today's 
   date in long format,.e.g. Friday, January 18, 2008. Whereever the short 
   date format of the current system date is expected, the natural language 
   date "today"  must be used.

  The change has exposed some unintended uses of the Date keyword. The
   following agent examples illustrate some valid and invalid uses. 

 Example 1: Date fields 
            Agents which automatically set Date fields to the 
            current date cannot use the (-Date-) keyword interchangeably 
            with "today". The (-Date-) keyword is no longer recommended 
            for use in Date fields. An example of the correct use of "today" 
            in agents can be found in the Tutorial Database. See the 
            agent named S.Account.Build.Add.Modify which sets the 
            addModifyDate to today's date.

 Example 2: Number Fields 
            The (-Date-) keyword is not supported in Number fields whose 
            values are calculated via Agent using the @ functions. One example 
            of this is a calculation that determines the number of days between 
            two dates. A valid formula would be: 
                 @Date("(%estimatedCloseDate%)") - @Date(Today)

 Example 3: Text Fields
            The (-Date-) keyword can continue to be used in Agents that 
            insert the current date into a Text field. For example, a date-time 
            stamp in the Notes field of an activity log.

  The Long Date format can be changed from Windows Control Panel, Regional
   settings, to one of the following supported formats:
      MMMM dd, yyyy
      dd MMMM, yyyy

 Any agents that currently insert the (-Date-) keyword into Date fields must be 
  updated to use "today" instead. After correcting the agent, be sure to check 
  your data to ensure no items have been added in the interim with blank Date fields. 
  Refer to "Technote 3309 - How to Filter on Blank Fields" on the commence.com website.

 Database developers should also review their code for possible usage of the date 
  keyword which may be impacted by this change. This includes DDE, Database API, and 
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties

~ ~ ~ ~ ~ ~
Source Code without Comments is like a Cranberry Garland
without the berries. Comment your Code!
Commence Database User Support Group Forum
~ ~ ~ ~ ~ ~
Author: Mark Petryk
Lorimark Solutions, LLC