Field-Map Scripting

4.1.7.7 Date2Integer

Date2Integer function


Prototype:

function Date2Integer (Date : variant) : variant;

Description:

Converts the value of date variable into integer. {Date->YYYYMMDD}

Syntax:

variable := Date2Integer(Data);


Part

Description


variable

variable declared as variant


Data

Variable declared as date, containing the value to be converted




Return value:

Variant value after conversion


Example:

var

 date, i: variant;


begin

 date:= Now;       // property Now returns the current date and time

 i:= Date2Integer(date);

 ShowMsg(IntToStr(i));

end.



Output in Field-Map Data Collector:

In other words 10.11.2018


See also:                

String2Float; Variant2Float; Variant2Integer; Variant2String; String2Variant; Boolean2Integer; Date2Integer; Integer2Date; Int2Hex; IntToHex; GetBitFromLastThreeDigits;

SetBitOfDouble; GetBitOfDouble; SetBitOfInteger;  GetBitIfInteger; SetBitOfBigInt;  GetBitOfBigInt