Change The Date Format Of The $Date Dynamic Variable
The current format for the $Date dynamic variable is YYYY/MM/DD. An additional custom variable can be created to allow alternate formatting. For example, MM/DD/YYYY.
Via the manager console, click on Client Configuration | Global Options | User Management Options | Definitions, then press the edit button. Next, choose “Edit” and paste the following code into the definitions area before saving the changes:
$Year = left($Date,4)
$Day = right($Date,2)
$Month = substr($Date,6,2)
$Date2 = $Month + '/' + $Day + '/' + $Year
Now use $Date2 instead of $Date to get the format MM/DD/YYYY.
Note: Use a message box to view the result.
Note: Pressing F2 from a data field will display a list of dynamic variables.
© 2021 Quest Software Inc. ALL RIGHTS RESERVED. Feedback Terms of Use Privacy