Bubble expects that to be in milliseconds but it looks like it’s in seconds for you. That’s why you’re getting a time in 1970. One way to do it would be to bring in that value as a number and multiply it by 1000 and then convert that number into a date
I have a plug-in element that turns seconds into a date if that would be helpful for you. It’s free
I don’t think the date is in second but I think the date doesn’t have any delimiter and Bubble is unable to parse it. So what we see in the screenshot is 2022-01-20. Adding 1000 will not help and Bubble will not be able to parse it.
I think you may need to get is as a text and probably convert it to date. You can also use a regex function or split by to set the display of the date in the way you want it (but always set the API Connector to text and not date).
var my_year = index's date_text:truncated from end to 4:converted to number
var my_month = index's date_text:truncated from end to 6:truncated to 2:converted to number - 1
var my_day = index's date_text:truncated to 2:converted to number
var my_date = new Date(my_year, my_month, my_day);
console.log (my_date)
The result:
Did you have any experience with the Tool Box plugin?
You can use it to extrat the result of any JavaScript code into Bubble.