SOLVED

Marketo API date & datetime errors

Go to solution
Anonymous
Not applicable

Marketo API date & datetime errors

Hello,

I have several custom fields I added to our database for our sandbox testing.

When I pull this data from our local repository & try to send to Marketo, I keep getting errors on fields that have the type Date and Datetime: "1003: Invalid value for field ''".

This is because our database (MySQL) has null values with DATE & DATETIME types, so the resulting values come out as 0000-00-00 and 0000-00-00T00:00:00. Unfortunately I need these values to be stored in Marketo as is.

Is there any way around these errors aside from changing the Marketo field's data type to String?

1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: Marketo API date & datetime errors

Well, 0000-00-00 has never been a valid ISO8601 date, like 2017-00-00 is not valid.

0000-01-01 is technically valid (though unsupported by Marketo anyway).

At any rate, if you can't send a blank value you need to use a String (which will mean datetime queries won't work).

View solution in original post

1 REPLY 1
SanfordWhiteman
Level 10 - Community Moderator

Re: Marketo API date & datetime errors

Well, 0000-00-00 has never been a valid ISO8601 date, like 2017-00-00 is not valid.

0000-01-01 is technically valid (though unsupported by Marketo anyway).

At any rate, if you can't send a blank value you need to use a String (which will mean datetime queries won't work).