Skip to main content

Hello friends! 

I want to send an API request and need to include date in the DateTime format. I am not sure what does that mean, but let me know if Zapier formatter can convert a date into this format? Or is there any alternative? 

@admin_speakeasy

It looks like there’s a handful of DateTime formats that Zapier’s formatter can translate the date into:

https://zapier.com/help/create/format/modify-date-formats-in-zaps#customize-date-time-options

Does the API you’re trying to use have documentation that explains which format it is expecting?


Thanks @COLEMANSAM, didn’t notice this in formatter. From their docs, this is the only mention i have seen.
 


I’m sending a JSON payload in this format.
 

curl https://app.snipcart.com/api/discounts \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-u {YOUR_API_KEY}: \
-d "{ name: 'Free shipping',
trigger: 'Total',
totalToReach: 150,
type: 'Shipping',
shippingDescription: 'Free shipping',
shippingCost: 0,
shippingGuaranteedDaysToDelivery: 10 }"

@admin_speakeasy I would try formatting the date into the following format for SnipCart to accept it:

YYYY-MM-DDThh🇲🇲ss.SSSZ

Here is an example I found from a different page of the SnipCart docs:

2016-05-25T21:21:27.213Z

It doesn’t appear that Zapier offers this format as one of their predefined options, so you can just click on the “Custom” tab and paste YYYY-MM-DDThh🇲🇲ss.SSSZ in order to use that format.

Hope this helps!


Thanks @colbyhemond Tha worked flawlessly 🙂