change date format Y-m-d H:i:s from json feed with jquery

I have received a problem with converting the date format from Y-m-d H:i:s to dd-MM-YYYY by using JQUERY.

My json looks like:

And ajax request:

Can anyone kindly assist me by using jsfiddle? I am new to jquery….

Utilize the split function in pure JavaScript, & toss the varaibles around.

This might seems a yet ugly, & it is. But it suits, as long as you don’t actually need to format the date in other ways (like timezone & such). Then you’d have to look into the Date() object.

EDIT: I want to encourage people to use as much pure JavaScript as possible, due to it’s speed. Often jQuery libraries & functions is filled with overhead, which causes your site to not only load slow, yet moreover process slow. There are no short-cuts to the perfect code, you’ll have to spend some time with it, & learn some tips & tricks. Good luck 🙂