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

Re: [amibroker] Re: Date for Bar



PureBytes Links

Trading Reference Links

Title: Re: [amibroker] Re: Date for Bar


DATETIMECONVERT
- date/time format conversion

Date/Time
(AFL 2.90)


SYNTAX 

DateTimeConvert( format, date, time = Null ) 

RETURNS

NUMBER or ARRAY 

FUNCTION 

The function allows to convert from DateTime format to DateNum and TimeNum and vice versa. 

format parameter controls the direction of conversion: 

format = 0 - converts DateTime format to DateNum format, example 

mydatenum = DateTimeConvert( 0, DateTime() );// - this returns DateNum 
date argument should be in datetime formattime argument in this case should not be used 

format = 1 - converts DateTime format to TimeNum format, example: 

mytimenum = DateTimeConvert( 1, DateTime() ); // - returns timenum 
date argument should be in datetime formattime argument in this case should not be used 

format = 2 - converts from DateNum and optionally TimeNum to DateTime format, example: 

mydatetime = DateTimeConvert( 2, DateNum(), TimeNum() ); 
date argument should be in datenum formattime argument (optional) should be in timenum format. In case of EOD data you can skip time argument: 

mydatetime = DateTimeConvert( 2, DateNum() ); 

format = 3 - (AB5.0 or higher) converts DateTime format to Seconds (00..59) example: 

myseconds = DateTimeConvert( 3, DateTime() ); 

date argument should be in datetime, formattime argument in this case should not be used 

format = 4 - (AB5.0 or higher) converts DateTime format to Minutes(00..59) example: 

myminute = DateTimeConvert( 4, DateTime() ); 

date argument should be in datetime, formattime argument in this case should not be used 

format = 5 - (AB5.0 or higher) converts DateTime format to Hours (00..23) example: 

myhour = DateTimeConvert( 5, DateTime() ); 

date argument should be in datetime, formattime argument in this case should not be used 

EXAMPLE


mydatenum = DateTimeConvert( 0, DateTime() );// - this returns DateNum 
mytimenum = DateTimeConvert( 1, DateTime() ); // - returns timenum 
mydatetime = DateTimeConvert( 2, DateNum(), TimeNum() ); 
mydatetime = DateTimeConvert( 2, DateNum() ); 



herman


Friday, May 1, 2009, 9:51:58 AM, you wrote:


> I did (I always do before posting here). On page 357, there is a list of all

> datetime related functions, but it's not there. Or I completely missed it.


> In any case, if anybody knows it, please post. Thank you.



> --- In amibroker@xxxxxxxxxxxxxxx, "sidhartha70" <sidhartha70@xxx> wrote:


>> Look at the functions list sorted by category. there are a whole bunch of functions depending on the specifics of what you want.


>> It's all in the user manual.


>> --- In amibroker@xxxxxxxxxxxxxxx, "lucianomt" <lucianomt@> wrote:

>> >

>> > anyone?

>> > 

>> > 

>> > --- In amibroker@xxxxxxxxxxxxxxx, "lucianomt" <lucianomt@> wrote:

>> > >

>> > > What is the function that returns the date for a given bar?

>> > >

>> >






> ------------------------------------


> **** IMPORTANT PLEASE READ ****

> This group is for the discussion between users only.

> This is *NOT* technical support channel.


> TO GET TECHNICAL SUPPORT send an e-mail directly to 

> SUPPORT {at} amibroker.com


> TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at

> http://www.amibroker.com/feedback/

> (submissions sent via other channels won't be considered)


> For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:

> http://www.amibroker.com/devlog/


> 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/





__._,_.___


**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/





Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___