Various date formats for purchase date on mws api orders ListOrders call


#1

Issue: Date format on the response XML for ListOrders varies for the field “Purchase Date”
Expected Date Format: yyyy-MM-dd’T’HH:mm:ss.SSS’Z’

  • This is the format returned for most orders.
    However, there are a few orders where the date format changes.
    Wrong Date Format Seen for few orders: yyyy-MM-dd’T’HH:mm:ss.ss’Z’
    The date format is expected to be standardized to avoid transformation issues in any middleware or API consumption application.
    But we see different formats returned for a few orders which is breaking our integration.

Question :

  1. How to resolve this issue?
  2. Is there a way to force a certain specific date format for the response XML?

#2

So the lack of a thousand’s place at the end is an issue you can’t integrate? Or am I overlooking something?


#3

@BARK1 This is perfectly normal, because the digits after the . represent a decimal value of a second, and not a number of milliseconds.

If the ms value is .123 it is displayed as .123, and if it’s .120 it is displayed as .12.

Source: w3: TR/NOTE-datetime

s = one or more digits representing a decimal fraction of a second

Moderator Edit (James_Amazon): External URL Removed