What type of data should I be creating/using for the date fields?

Sep 15, 2009 at 5:38 AM

Forgive me I haven't seen any information in any of the docs on this, and I believe I may have read them back to front a few times by now. =)  What type of data should I be using for a field which the proxy identifies as 'Edm.datetime'?

 

This is obviously a date or timestamp in the data model.  I've tried a few things but can't figure out what data type in php it's expecting.

 

Regards

 

Rob

Coordinator
Sep 18, 2009 at 3:29 AM
Edited Sep 18, 2009 at 3:47 AM

Hi Rob,

In our client application we can use string to represent date. For example:

$order = $proxy->ExecuteQuery("Orders(OrderID=10248)");
$order[0]->OrderDate = '2008/05/07';
$proxy->UpdateObject($order[0]);
$proxy->SaveChanges();

The above code will fetch the first Order record from Orders table of NorthWind database and update the OrderDate column to 2008/05/07. We can represent date in yyyy/mm/dd format.

Please feel free to ask, if you have still doubt

 

Thanks & Regards,

Anu