I'm trying to get a Date js object from a string with a specific format.
My string date looks like this:
2019-04-22 05:00:11
Im trying to do it this way, but I don't achieve the expected results:
date_string = "2019-04-22 05:00:11"
date = Date.parseDate(date_string, "YYYY-MM-DD HH:mm:ss")
After this I want to add this Date object a time_delta of 30 minutes and represent it on string format, which I think it should be done this way:
new_date = new Date(date.getTime() + i*30*60000)
final_date_string = new_date.toString();
I want final_date_string
to look like this:
2019-04-22 05:30:11