How can I convert the right date from a Instagram post?


I have connected Blockspring to get info from Instagram posts, to collect the statistics. My problem is that when I show the Created_time (this should be the date + time the post has been posted) I get this when I receive the data as ‘date’:

and when I get the data as ‘text’ from Blockspring I get this:

To be clear the content isn’t post in the 70’s :stuck_out_tongue:

Hope someone knows how I can convert this into the right date & time.

Screenshot of the Blockspring api:

I believe this is a UNIX timestamp. There’s probably a much more straightforward way to do this (a built-in UNIX timestamp converter, perhaps) but one way is to use Javascript and moment.js.

To do this:

  1. Install the Toolbox plugin and drag a Javascript to Bubble element to your page.
  2. Add moment.js to your page by putting this in its html header:
    <script src=""></script>
  3. Add an input to your page. Let’s call it ‘inputUnixDate’
  4. Add a workflow for when the value of the input changes and in the workflow, add a Run Javascript step. Add this script:
    alert(moment(inputUnixDate’s value, ‘X’).format(‘MM/DD/YYYY’));
  5. Load your page and type a unix timestamp like the one in your example. You should get an alert with the formatted date

Obviously this is just to show you the value. You would have to adapt this to return the value and use it when saving a post from Instagram, if that’s what you want to do.

It’s probably also possible to use pure javascript to do this without needing the moment.js library, but I don’t know how I’m afraid.