I've been trying to store 'Date' via API, but somehow it doesnt work

I have created new field in profile management, called 'prospect_date'

If I create new subscriber, pass all attributes via API without specifing prospect_date (attribute/value) , in ET it successfully creates a row without prospect_date, which is right

If I create new subscriber, pass all attributes and also {"Name"=>"prospect_date", "Value"=>"2014-01-24 23:46:13 UTC"}, in ET it successfully creates a row BUT the prospect_date doesn't get stored properly, somehow it stores today's date

Also I tried this one too, still doing the same thing. {"Name"=>"prospect_date", "Value"=>"24/01/2014"}

I'm guessing I need to pass with specific format, or by default it will store today's date, do you know format should I use?

  • Make sure not to leave your question open - if it's solved, select the checkbox as answered. If it is unresolved, let me know how else I can help. – Kelly J Andrews Jan 19 '14 at 2:35
  • Please be sure to mark your question answered. This will help the rest of the community. – Kelly J Andrews Jan 27 '14 at 9:17

According to the documentation

Attributes of a date type will accept dates in various formats, such as 1/1/2005 or January 1, 2005. All dates are stored in the format MM/DD/YYYY, and if a date is entered in a different format, the system will convert it to the proper format when storing it.

I believe 2014-01-24 23:46:13 UTC fails because it's not expecting a UTC time, and 24/01/2014 fails because the format is DD/MM/YYYY.

Hope this helps!

| improve this answer | |

When passing it, try using XSD Date Format, so instead of "2014-01-24 23:46:13 UTC", it woudl look like "2014-01-24T23:46:13Z".

The Z indicates that it is UTC time. If you want to pass the value with a specific offset then you can replace Z with the offset, for example: "2014-01-24T23:46:13-05:00".

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.