I'm getting the following format of date from db
2016 1 24 12:00am
I want make it as moment object so I can do some processing with it
I tried something like below
m = moment('2016 1 24 12:00am').format('YYYY M D ha');
it says invalid date
how to parse this type of strings?
I will get year, month, date and time from different vars, I can construct string like 2016-1-24-12:00am
still it throws error