Some notes for programming:
The Gbase expiration date is in ISO 8601 format. It can be converted
to MySQL format like this:
$objExpiration_date_iso8601 = new DateTime($object->text);
$expiration_date_mysql = $objExpiration_date_iso8601->format('m-d-Y
H:i:s');
So, the sample code is:
# Get the item expiration_date from the result returned by Google
# Search through the base attributes to find the attribute
"expiration_date":
foreach ($entry->baseAttributes as $object):
if ($object->rootElement == 'expiration_date'):
$objExpiration_date_iso8601 = new DateTime($object->text);
endif;
endforeach;
# convert date from ISO 8601 format to MySql format
$expiration_date_mysql = $objExpiration_date_iso8601->format('m-d-Y
H:i:s');
--
You received this message because you are subscribed to the Google Groups
"Google Base Data API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-base-data-api?hl=en.