+ Start a Discussion

is not a valid value for the type xsd:dateTime


The complete error is:

A problem witht he OnClick JavaScript for this button or link was encountered:


faultstring:"2013-04-30T20:00:08.263+06.5:30' is not a valid value for the type xsd:dateTime',}


We have a Take Case button with the following code:


var caseObj = new sforce.SObject("Case"); 

caseObj.Id = '{!Case.Id}'; 
caseObj.OwnerId = '{!$User.Id}'; 
caseObj.Status = 'In Progress'; 

var roleName = '{!$UserRole.Name}'; 
if((roleName.indexOf("Tier 3") != -1) || (roleName.indexOf("Field Operation") != -1) || (roleName.indexOf("Service Engineer") != -1))
caseObj.Substatus__c = 'Open with Product Specialists'; 
caseObj.Substatus__c = 'Open with Support Advocates'; 

caseObj.Incident_First_Response__c=new Date(); 

var result = sforce.connection.update([caseObj]); 

if (result[0].success=='false') { 
} else { 





If a users PC time zone is set for any that are +6:30 or +5:30 (not on the hour, but the half hour) and they try to click this button they receive this error.  Is there a way to correct this?

Was there ever an answer to this?  I am running into the same issues ...
Amit VaidyaAmit Vaidya
Hi All,

Leslie Brohm explained it as below.

Yes, it can be solved by giving the DateTime format as YYYY-MM-DD HH:MM:SSZ. So for example you can try something like this format it as 2012-11-17 13:30:00Z.

@AmitVaida How to convert in this date format in jquery?