sx_GetDateJulian

<< Click to Display Table of Contents >>

Navigation:  Apollo API Listing >

sx_GetDateJulian

VB Declaration

Declare Function sx_GetDateJulian Lib "Apollo9.dll"

(ByVal cpFieldName As String)

As Long

C Declaration

LONG FAR PASCAL sx_GetDateJulian

(BYTEP cpFieldName);

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 JULIAN dates equal or greater than January 1, 1000 are supported.

 

Parameters

cpFieldName: The name of the field.

Return Value

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

VB Example

' calculate days it takes customer to pay

lDays% = sx_GetDateJulian("PAYDAY") - sx_GetDateJulian("SALEDAY")

C Example

LONG lDays;

lDays = sx_GetDateJulian("payday") - sx_GetDateJulian("saleday");

See Also

sx_GetDateString, sx_SetCentury, sx_SetDateFormat