datetime I expect that: 1980.01.01 00:000 And I get this: 1980.01.01 00:005

 
Hello,

With this script:

//+------------------------------------------------------------------+
//|                                                   spDateTime.mq4 |
//|                        Copyright 2014, MetaQuotes Software Corp. |
//|                                              https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2014, MetaQuotes Software Corp."
#property link      "https://www.mql5.com"
#property version   "1.00"
#property strict
//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart()
  {
//---
   datetime d1=D'1980.01.01 00:00:00';
   Print("d1 :"+TimeToString(d1),TIME_DATE|TIME_SECONDS);
  }
//+------------------------------------------------------------------+

I expect that:

2014.02.22 16:33:09.483 spDateTime2 GOLD Weekly: d1: 1980.01.01 00:000

And I get this:

2014.02.22 16:33:09.483 spDateTime2 GOLD Weekly: d1: 1980.01.01 00:005

Can someone explain to me?

 
Report it do the Service Desk
I missed the parenthese.
 
tintin92:
Hello,

With this script:

I expect that:

And I get this:

Can someone explain to me?

You misplaced you parenthesis, try this way :

   datetime d1=D'1980.01.01 00:00:00';
   Print("d1 :"+TimeToString(d1,TIME_DATE|TIME_SECONDS));
 
Thanks
Reason: