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