KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Modifying a macro's date format
PRODUCT: 4D | VERSION: 2003 | PLATFORM: Mac & Win
Published On: September 8, 2006

When using the Method editor, a macro can be used to insert a date. The date can be displayed in 8 different ways. Here are instructions to modify the date tag in the Macro.xml file.

1. Open the Macro.xml file in a text editor. The file is located in your active 4D folder and varies with your machine.
2. Modify the date format tag by entering a number between 1 and 8.
This is how the tag is used with option 3, <date format="3"/>.

The following list displays the option and how the date is formatted.

Option Format
1 9/7/2006
2 Thu, Sep 07, 2006
3 Thursday, September 07, 2006
4 09/07/06
5 September 7, 2006
6 Sep 7, 2006
7 09/07/2006
8 2006-09-07T00:00:00

Additional macro information can be found in the 4D Design Reference on Chapter 8: Creating Methods, Using the Method Editor, Creating and using macros.

ftp://ftp.4d.com/ACI_PRODUCT_REFERENCE_LIBRARY/4D_PRODUCT_DOCUMENTATION/PDF_Docs_by_4D_Product_A-Z/4D/4D_2004/4d_2004_design_ref.pdf