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

Re: CL_Need date converter-Help !!



PureBytes Links

Trading Reference Links

Hi Steve,

create a user function named "datetostr" and paste the following code:

=======================================
input: vDate(numericsimple);
vars: YY(0), MM(0), DD(0), StrDate("");

MM = month(vdate);
YY = year(vdate);
DD = DayOfMonth(vdate);

YY = YY + 1900;

StrDate = numtostr(YY,0);
if(MM < 10) then
 StrDate = StrDate +  "0" + numtostr(MM,0)
else
 StrDate = StrDate + numtostr(MM,0);

if(DD < 10) then
 StrDate = StrDate +  "0" + numtostr(DD,0)
else
 StrDate = StrDate + numtostr(DD,0);

DateToStr = StrDate;

========================================

then in your EL code use "datetostr" instead of "date"....

Good trading

Maxime



----- Original Message -----
From: "sptrader" <sptrader@xxxxxxxxxxxxx>
To: "Omega List" <omega-list@xxxxxxxxxx>; "MB Code_list"
<code-list@xxxxxxxxxxxxx>
Sent: Monday, September 18, 2000 19:03
Subject: CL_Need date converter-Help !!


> Does anyone have (.ela or .els) code to convert the 1000101 format to
> 20000101 ?- I'm trying to export a date file from TS and must have the
> conventional date format to import the file into other software.
> Thanks in advance.
> Steve
>
> The Code List -
> Subscribe/Unsubscribe
> http://www.markbrown.com