#JKL-timestamp

1 messages · Page 1 of 1 (latest)

lavish shale
#

hello there, can you share the code which you're parsing the timestamp?

crisp haven
#

Hi Alex, something like the following:

`stripe.invoices.retrieveUpcoming({customer: body.stripeCustomerID})
.then((response) => {
console.log(new Date(response.next_payment_date));
console.log(new Date(response.period_end));
console.log(new Date(response.lines.data[0].period.end));

            })`
lavish shale
#

the Date takes in milliseconds, but Stripe returns an unix timestamp which is in seconds

crisp haven
#

Awesome, that was it

#

Thanks very much Alex

lavish shale
#

you're welcome 😄