Re: [amibroker] Re: [Code] Array of Date in "yyyymmdd" format, then array converted to String

 

Hi
for your question is to use StrLeft  if you like to keep Only the dd/mm/yyyy

  DDate = WriteVal( BeginValue(DateTime() ), formatDateTime );
  printf(  "Test DateTime ="+ DDate + "\n" );
  printf(  "using strleft =" + strleft( DDate , 11) ) ;

 I think Alan said to use DateTimeToStr() i dont know what is wrong in your code..
to keep Only the DDMMYYY use mode 1

  BegStr2 = DateTimeToStr(bdn, 1);
  Endstr2 = DateTimeToStr(edn, 1);
  printf( BegStr2 + "\n" );
  printf( Endstr2 + "\n" );


   https://www.amibroker.com/guide/afl/datetimetostr.html
  The mode parameter defines the output mode:
    0 - convert both date and time portion
    1 - only date
    2 - only time.

Panos


On 20-06-16 3:29 PM, meanomalist@yahoo.com [amibroker] wrote:

 

Dear Panos,


Test = 04/12/2015 18:00:00 

how to take the date portion only "04/12/2015" from the output?




__._,_.___

Posted by: Panos Boufardeas <panosbouf@gmail.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (13)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.

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


.

__,_._,___


EmoticonEmoticon