How To Convert Firestore Timestamp To JavaScript Date

  Рет қаралды 2,903

Appsmith

Appsmith

Күн бұрын

Пікірлер: 7
@gw5827
@gw5827 4 ай бұрын
awesome video. Grateful for this explination it really has clear! I would appreciate listening without the background music in the future 🙏
@riderfish
@riderfish Жыл бұрын
Man you SAVED my hours, it's so annoying honestly, wonder why don't they just save a timestamp and thats all
@amitshrestha6833
@amitshrestha6833 Ай бұрын
However, the hour and minutes are sitll not the local time as shown in firestore document
@andy4905
@andy4905 11 ай бұрын
You don't need to do all of this, the timestamp has a method on it .toDate() it will then become a JS Date().
@greyes11
@greyes11 4 ай бұрын
const manipulateDate = (timestamp) => { const unixTimestamp = (timestamp.seconds + timestamp.nanoseconds * 10**-9) * 1000; return new Date(unixTimestamp); };
@davidlintin
@davidlintin Жыл бұрын
And then how to get it to a readable date?
@appsmith
@appsmith Жыл бұрын
You could use moment for that docs.appsmith.com/core-concepts/writing-code/ext-libraries#moment
Пришёл к другу на ночёвку 😂
01:00
Cadrol&Fatich
Рет қаралды 3,9 МЛН
Cute kitty gadgets 💛
00:24
TheSoul Music Family
Рет қаралды 22 МЛН
Шок. Никокадо Авокадо похудел на 110 кг
00:44
How to convert an API timestamp to readable time
9:39
DanyCode
Рет қаралды 1,1 М.
Using Cloud Firestore For Your REACT Backend 2023 | CRUD App
51:15
Travis Media
Рет қаралды 21 М.
Using Day.js in React
20:02
Coders Campus
Рет қаралды 10 М.
7 Steps of Automating Your Retail Store the Easy Way
10:20
Kewal Kishan - Automate Business
Рет қаралды 19 М.
Пришёл к другу на ночёвку 😂
01:00
Cadrol&Fatich
Рет қаралды 3,9 МЛН