[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

TS4 b24



PureBytes Links

Trading Reference Links

I just did the upgrade on my backup machine. Seems to work fine in 
offline mode. At the end of the installation, it asks you to paste 
in an ela containing 2 new functions for dealing with the way EL does 
post-1999 dates (Dec 31, 2000 = 1001231). Here they are for those who 
like to get under the hood.

-Dennis

{***********************************************************************
Function:	: ELDateToString
Description	: Function returns a seven digit Easy Language date (YYYMMDD)
Provided By	: Omega Research, Inc. (c) Copyright 1999
************************************************************************}

Inputs: MM(Numeric), DD(Numeric), YYYY(Numeric);
Variables: JulianYear(0);

IF YYYY >= 1900 Then Begin
	JulianYear = YYYY - 1900;
	ELDate = (JulianYear * 10000) + (MM * 100) + DD;
End
Else
	ELDate = -1;


{***********************************************************************
Function:	: ELDateToString
Description	: This Function returns an eigth character date string (MM/DD/YYYY)
Provided By	: Omega Research, Inc. (c) Copyright 1999
************************************************************************}

Inputs: DateSlct(Numeric);
Variables: YearPortion(""), StringMonth(""), StringDay("");

YearPortion = NumToStr(1900 + IntPortion(DateSlct * .0001), 0);
If DateSlct >= 1000000 Then
	StringMonth = MidStr(NumToStr(DateSlct, 0), 4, 2)
else
	StringMonth = MidStr(NumToStr(DateSlct, 0), 3, 2);
StringDay = RightStr(NumToStr(DateSlct, 0), 2);

ELDateToString = StringMonth + "/" + StringDay + "/" + YearPortion;