Log In    |    Knowledge Base    |    4D Home
Tech Tip: Modifying a macro's date format
Published On: September 8, 2006
Your current browser may not allow you to download the asset. We recommend Mozilla Firefox or Google Chrome.
Log In

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.