AnsweredAssumed Answered

How to put date_start parameters via REST got error Did not recognize date_start

Question asked by Autchara Chaiprom on May 19, 2016
Latest reply on May 20, 2016 by Autchara Chaiprom

Hi all,

 

I created Calls via REST v10 I copy format of start_date from database.

but always return error message.

stdClass Object
(
  [error] => invalid_parameter
  [error_message] => Did not recognize date_start as a date/time, it looked like 2016-05-19 12:45:00
)

 

My code is below:

$seconds = time();
$_seconds = ceil($seconds / (15 * 60)) * (15 * 60);
$date_start = date('Y-m-d H:i:00', $_seconds);
$url = $base_url . "/Calls/";
$record_arguments = array(
    "name" => "Test from local",
    "description" => "Description from local",
    "parent_id" => "<id>",
    "date_start" => $date_start,
    "status" => "<status>",
     ...
);

 

How do I put time in date_start or any date?

 

Sugar 7.6 Ent

Thanks,

May

Outcomes