GetDateJulian

<< Click to Display Table of Contents >>

Navigation:  Apollo VCL Components > Apollo VCL Component Reference > TApolloTable > TApolloTable Methods >

GetDateJulian

Declaration

function GetDateJulian( sFieldName: String ): LongInt;

Description

Extracts the contents of a date field as a Julian number. This number is equal to the number of days since January 1, 4713 BC. However, only dates from January 1, 1000 are supported.

Parameters

sFieldName: The name of the field.

Return Value

The date expressed as a long integer. Useful for date arithmetic.

Delphi Example

// Calculate days it takes customer to pay

lDays := ApTbl.GetDateJulian( 'PAYDAY' ) - ApTbl.GetDateJulian( 'SALEDAY' );

C++Builder Example

// Calculate days it takes customer to pay }

lDays = ApTbl->GetDateJulian( "PAYDAY" ) - ApTbl->GetDateJulian( "SALEDAY" );

See Also

GetDate, GetDateString, SetCentury, SetDateFormat