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:
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:
Install the Toolbox plugin and drag a Javascript to Bubble element to your page.
Add moment.js to your page by putting this in its html header: <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.20.1/moment.min.js"></script>
Add an input to your page. Let’s call it ‘inputUnixDate’
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’));
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.