Wiki

Scale Your Enterprise

User Tools

Site Tools


kb:kb_item_301

KB Item 301

Product

BIZWEAVER

Product Version (if applicable)

Issue

How to format a date to use with Shopify API calls

Symptom

Cause

Resolution Notes

<p>When retrieving orders from a Shopify store through the API you may want to look at orders beginning with a create date of 'x' days in the past.&nbsp; To do this:</p><p>1)&nbsp; Create a SQL Reader step before any API calls.<br />2)&nbsp; Use the following SQL statement.&nbsp;&nbsp;</p><p>select<br />left(convert(nvarchar,getdate() - 5,126),11) + '00.00.00-4:00' as [BackDate] </p><p>This will give you the date five days ago, formatted as the Shopify API expects it per Shopify's documentation.&nbsp;&nbsp;This is the output:&nbsp; 2017-11-04T00.00.00-4:00.</p><p>Use the output (BackDate) from this SQL step as a variable in the URL sent to Shopify.</p><p>&nbsp;</p>

KB Type

HowTo

Item Date

05 Jan 2018

kb/kb_item_301.txt · Last modified: 2019/01/24 09:44 (external edit)