Setting the start date through the web service
I'm struggling trying to set the startDate or endDate through a webservice using php. I have tried just specifying a string such as '2006-06-25T17:15:33' but the results are an incorrect start date.
How do I set the startDate with a webservice and php?
Comments are currently closed for this discussion. You can start a new one.
Support Staff 2 Posted by Penny on 29 Jun, 2010 08:05 PM
Start Date and End Date are stored in Cascade as Unix timestamps. So you will probably need to change your date to that format.
3 Posted by Timothy Gilman on 29 Jun, 2010 08:33 PM
Here is some php code I used to convert a string date into a unix timestamp
4 Posted by nathan.tanner on 29 Jun, 2010 09:03 PM
http://www.hannonhill.com/kb/Web-Services/web-services-operations/c...
The knowledge base says
'The metadata object contains the familiar "wired" fields from the metadata pane of an edit screen for metadata-aware objects. Most take a String - with the exception of the date fields, which take a long-formatted date String - of the format CCYY-MM-DDThh:mm:ss, such as 2006-06-25T17:15:33, which would be 5:15:33pm on 25 June, 2006 (more information here: http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/#dateTime).'
After looking over my code I found a programing error after correcting it the string as specified above worked.
I used the jquery ui date selector then just appended the date string with . 'T12:00:00:00'
Its working now! Thanks for everyone's help.
Tim closed this discussion on 29 Jun, 2010 09:14 PM.