View Single Post
  #4  
Old 02-13-2004, 05:13 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,027
Text within brackets in a VBP step field indicates a script expression to be evaluated. So [DATETIME] evaluates to nothing in VBScript and [DATE] evaluates to the VBScript Date function (which btw will evaluate to the same value as the VBP DATE system macro).

Values between percents in a field indicate the name of a macro to be evaluated. So %DATE% or %DATETIME% will return the corresponding system macro values for those macros. This applies for all fields on most step properties (including the Script code field of the Run Script action).

However, brackets and percent do not have any special meaning in the Script Editor (project scripts, global scripts, etc.), so you would need to use the method you described, or if the macro/script may itself reference other macros or script use:

Application.ExpandMacrosAndScript("%DATETIME%")
Reply With Quote