Consultor Eletrônico



Kbase 16856: How to Convert OLE Dates to/from 4GL Dates
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   15/08/2000
How to Convert OLE Dates to/from 4GL Dates

The following functions allow you to convert a 4GL Date to an OLE
Date and vice-versa.

These functions are needed when you need to work with an OLE object
which expects a date formatted as an OLE Date datatype. OLE Date
datatypes are actually floating point numbers which contain both a
date and a time value.

FUNCTION ConvDateToOLE32 RETURNS INTEGER (aDate AS DATE).
RETURN YEAR(aDate) * 512 + MONTH(aDate) * 32 + DAY(aDate).
END FUNCTION.

FUNCTION ConvOLE32DateTo4GLDate RETURNS DATE (anOLEDate AS INTEGER).
RETURN

Progress Software Technical Support Note # 16856