Forum Documentation Showcase Pricing Learn more

Timestamp Jan 18th 1970


#1

Hi there,

I’m having trouble to convert a timestamp to a date formatted like 6/21/2018.

The Text recognise the data received from an API call as a timestamp but in the RG always displays Jan 18th 1970:

Anyone can help?

Thanks a lot.


#2

Anyone can give me a hand, please?

Thanks in advance


#3

Its likely that the API is returning seconds instead of milliseconds?


#4

Thanks for the reply @mishav

That’s correct, the timestamp is in senconds (1499806103) and apparently Bubble needs it in millisenconds (1499806103000), but I can’t change it. If I could multiply it by 1000 (what I can’t), Bubble then doesn’t recognise it as a date.

What do you recommend?

Thanks very much


#5

You can try this API:

https://helloacm.com/api/unix-timestamp-converter/?cached&s=1499806103


#6

There’s a plugin in the store, Search Unix.


#7

Thanks very much for your help, @vincent56 @yusaney1

@yusaney1I installed the Unix Converter but I must be doing something wrong as it doesn’t show me anything. I’ve even tried instroducing the timestamp myself (1499806103) and nothing, no result in the repeating group:

imagen

Thanks very much again.


#8

@vincent56 Regarding your suggestion, I used it but it don’t recognise the result as a json but a text, so the result comes with “quotes”.

:confused:


#9

Hey, @Rudo can you try this: (copy it exactly as this image)(use your :format)

(Don’t need to use any plugin or API)

Using your timestamp should give this:


#10

Sorry just saw you simply needed to format the date not convert. Yusaneys suggestion is the way to go then!


#11

Wow, that worked!!

Thanks very much, @yusaney1!


#12

@yusaney1 can you revise your calculation to take into account timezone offset?