Answer the question
In order to leave comments, you need to log in
How to parse a date from a string in JS?
I would like to know, I get the date from php, with a string like "2019-04-10 08:42:14", I would like to parse it into separate parts. Since I'm using VUE on the front. I'm thinking of making 2 filters. The first would give only the day, the second year and month.
Answer the question
In order to leave comments, you need to log in
As an option, I suggest you use moment.js - one of the easiest ways to work with date and time in js
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question