Skip to content

TExprBuiltInManager.AddDateTimeVariable

Add datetime variable to built-in collection

Declaration

Source position: fpexprpars.pp line 823

public 
function TExprBuiltInManager.AddDateTimeVariable
                                                (const ACategory: TBuiltInCategory; 
                                                const AName: ShortString; 
                                                AValue: TDateTime)
                                                 : TFPBuiltInExprIdentifierDef;

Description

The AddDateTimeVariable method adds a datetime variable with the specified name and initial value to the built-in collection. The variable will be available in expressions under the provided name and will initially hold the specified datetime value.

Built-in datetime variables can be used to provide predefined date/time values like current date, system timestamps, or reference dates that expressions can access and use in date/time calculations.