Variant.IsDate() Method
Version: Available or changed with runtime version 1.0.
Indicates whether an AL variant contains a Date variable.
Syntax
Ok := Variant.IsDate()
Note
This method can be invoked using property access syntax.
Parameters
Variant
Type: Variant
An instance of the Variant data type.
Return Value
Ok
Type: Boolean
true if the AL variant contains a Date variable, otherwise false.
Example
The following example determines whether an AL variant contains a Date variable. The code initializes the MyDate variable with a Date value. The MyDate variable is assigned to the variant variable that is named MyVariant. The IsDate method determines whether the variant contains a Date variable and stores the return value in the varResult variable. In this case, the variant contains a Date variable so true is returned and displayed in a message box. The IsCode Method (Variant) determines whether the variant contains a Code variable. The return value is false because the variant does not contain a code.
var
MyDate: Date;
MyVariant: Variant;
varResult: Boolean;
Text000: Label 'Does the variant >%1< contain a date variable? %2.';
Text001: Label 'Does the variant >%1< contain a code variable? %2.';
begin
MyDate := Today;
MyVariant := MyDate;
varResult := MyVariant.IsDate;
Message(Text000,MyVariant,varResult);
varResult := MyVariant.IsCode;
Message(Text001,MyVariant,varResult);
end;
See Also
प्रतिक्रिया
https://aka.ms/ContentUserFeedback.
जल्द आ रहा है: 2024 के दौरान हम सामग्री के लिए फीडबैक तंत्र के रूप में GitHub मुद्दों को चरणबद्ध तरीके से समाप्त कर देंगे और इसे एक नई फीडबैक प्रणाली से बदल देंगे. अधिक जानकारी के लिए, देखें:के लिए प्रतिक्रिया सबमिट करें और देखें