PureBytes Links
Trading Reference Links
|
Nice. Thank you Ed. :)
--- In amibroker@xxxxxxxxxxxxxxx, "Edward Pottasch" <empottasch@xxx>
wrote:
>
> hi,
>
> this is how I do these things. Below an example how one could
extract the datestring from Now(); I leave the time part for you,
>
> rgds, Ed
>
>
> ts = Now();
>
> sl = StrLen(ts);
> strpos = 0;
> cnt = 0;
> for (i=0; i<sl; i++) {
>
> if (StrMid(ts,i,1) == "/") {
>
> strpos[ cnt ] = i;
> cnt = cnt + 1;
>
> }
>
> }
>
> // extract month
> sp1 = strpos[ 0 ];
> mt = StrMid(ts,0,sp1);
> if (StrLen(mt) == 1) {
> mt = "0" + mt;
> }
> // extract day
> sp2 = strpos[ 1 ];
> dy = StrMid(ts,sp1 + 1, sp2 - sp1 - 1);
> if (StrLen(dy) == 1) {
> dy = "0" + dy;
> }
> // extract year
> sp3 = strpos[ 2 ];
> yr = StrMid(ts,sp2 + 1,4);
>
> // construct date string
> dat1 = yr + mt + dy;
> "date string: " + dat1;
>
>
>
>
>
>
>
>
> ----- Original Message -----
> From: eric tao
> To: amibroker@xxxxxxxxxxxxxxx
> Sent: Thursday, June 14, 2007 4:02 AM
> Subject: [amibroker] GAT string construction
>
>
> Hi Guys,
>
> I'm trying to place a "GAT" ( GoodAfterTime ) order using IB
controller.
> Is there a good way to construct a current time string in "YYYYMMDD
> HH:MM:SS" format? as in "20070614 18:00:00"?
>
> Thank you
> Eric
>
Please note that this group is for discussion between users only.
To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
For other support material please check also:
http://www.amibroker.com/support.html
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/amibroker/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:amibroker-digest@xxxxxxxxxxxxxxx
mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx
<*> To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|