0

I am working with cloud functions. Actually, I am a flutter amateur, but cloud functions require JavaScript, so I don't have any Idea. I am getting a timestamp from this code.

admin.firestore.Timestamp.now()    

But I want to edit the timestamp and upload it to another collection. I want to convert the current month to the next month. i.e. - February to March and upload to another document.

Thanks a lot in Advance!

Rishi
  • 11
  • 5
  • Dates are pretty well covered on SO. If you search each of those steps separately I'd bet you'll find answers that help. – isherwood Feb 24 '22 at 16:52
  • Sorry, But I researched a lot, but any of the solutions are not working for me, Maybe I am dumb. – Rishi Feb 24 '22 at 16:55
  • I'd start here: https://stackoverflow.com/questions/5619202/parsing-a-string-to-a-date-in-javascript – isherwood Feb 24 '22 at 16:57
  • And finish here: https://stackoverflow.com/questions/53482750/convert-date-to-timestamp-for-storing-into-firebase-firestore-in-javascript – isherwood Feb 24 '22 at 16:57
  • Let us know if there aren't appropriate solutions there and we'll consider reopening the question. – isherwood Feb 24 '22 at 16:58

0 Answers0