Hello Guys!
I just wrote some code with JavaScript and Firebase, I obtained the date from Firebase in milliseconds and converted it to date format with this code.
const dateObject = new Date(milliseconds)
const humanDateFormat = dateObject.toLocaleString("en-US", {day: "numeric"}) + '/' + dateObject.toLocaleString("en-US", {month: "numeric"}) + '/' + dateObject.toLocaleString("en-US", {year: "numeric"});
Now I cant find the way back with this kind of date format I used. I want to edit the product but when I try to convert this date I can´t find a useful method.
Maybe should I use LocalStorage to storage the date in milliseconds then search for it and use it?
Thanks anticipated!
Regards, Gaspar.