*DATE
Field Name of *DATE prints the current system date. Length must be set 6 and Decimals must be 0 as the date value is retrieved from the system as an unformatted 6 position numerical string. It can be printed like this, but you would most likely want to format the string into a proper date format for your particular application. MarkMagic provides you with a few different options for accomplishing this.
On the Font tab, Edit Code Y "Date edit" cab be used to format the date according to your system locale. Please see Edit Codes for more information about that.
In MarkMagic version 11 and later, new date formatting methods have been added. To utilize these new date formats, first make sure Edit Code on the Font tab is set to "No Edit Code". Then type one of the new @DY formatting codes into the Description field on the Properties tab:
- @DYYMD
- Formats the date as YYYY-MM-DD (2024-08-31)
- @DYMDY
- Formats the date as MM-DD-YYYY (08-31-2024)
- @DYDMY
- Formats the date as DD-MM-YYYY (31-08-2024)
Additionally, the MM month number can be replaced with short month wording by replacing MM with MON:
- @DYYMOND
- Formats the date as YYYY-Month-DD (2024-Aug-31)
- @DYMONDY
- Formats the date as Month-DD-YYYY (Aug-31-2024)
- @DYDMONY
- Formats the date as DD-Month-YYYY (31-Aug-2024)
On top of all of this, for any of these formatting codes, the delimiters can be changed from the default dash symbol. To do this, specify the desired delimiter at the end of your chosen date formatting code. Available delimiters are: dash, forward slash, comma and period.
Example:
- @DYDMY/
- Formats the date as DD/MM/YYYY (31/08/2024)
- @DYMONDY.
- Formats the date as Month.DD.YYYY (Aug.31.2024)