You need to console log whatever you're retrieveing from the DB so you understand what format it appears in (whether there's a "T" in there, or a "Z", whether it has miliseconds etc).
Then use string methods to get a datestring that you can parse.
You need to console log whatever you're retrieveing from the DB so you understand what format it appears in (whether there's a "T" in there, or a "Z", whether it has miliseconds etc).
Then use string methods to get a datestring that you can parse.
If you retreive an object, I found best bate was to use some type of toString() method. Then once it's in a string it should be easier to manipulate.
Thanks for your response.toString didn't work for me. Used json.stringify to solve it