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

[amibroker] Re: date format YYYYMMDD



PureBytes Links

Trading Reference Links

Hello,

Try this:

_N(MyDate= WriteVal( Year(),1.0,0) +WriteIf(Month()>=10,"","0")
+WriteVal( Month(),1.0)+ WriteIf(Day()>=10,"","0")+WriteVal( Day
(),1.0) );

AddTextColumn( MyDate,"Date"); 

Zs.


--- In amibroker@xxxxxxxxxxxxxxx, "Andrew" <ae_perrin@xxxx> wrote:
> I need to generate a date format in explore of YYYYMMDD.  This only 
> needs to be a number (for export to another program). I've tried 
the 
> following:
> 
> tDate   = DateNum();
> Filter = 1;
> AddColumn(tdate+19000000,"",1.0);
> AddColumn(tdate,"",1.0);
> AddColumn(Year()*10000+Month()*100+Day(),"",1.0);
> 
> which gives the results:
> 
> WYL  11/1/2000  20001100  1001101  20001100	
> WYL  11/2/2000  20001102  1001102  20001102	
> WYL  11/3/2000  20001104  1001103  20001104	
> WYL  11/6/2000  20001106  1001106  20001106	
> WYL  11/7/2000  20001108  1001107  20001108
> 
> Note the 3rd & 5th column always round number off to even numbers 
> for some reason that is probably easily explained but is beyond me?
> Any Suggestions????
> Thanks
> Andrew.


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Natural Vitamins for Good Prostate & Male Health. $28.97
http://www.challengerone.com/t/l.asp?cid=2865&lp=prosta2.html
http://us.click.yahoo.com/qJIe0D/89VGAA/ySSFAA/GHeqlB/TM
---------------------------------------------------------------------~->

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/