I'm failing a bit to get this working.
I read out a date from my database in the yyyy-mm-dd format. However, I need to use it in my jQuery ajax call in the dd-mm-yyyy format. Is there a way to turn my dates around? I should've seen this coming when I started working on my app, but alas, I didn't :(
Don't feel like changing around the way I save stuff to my DB so I was wondering if anyone knows an easy way to change the format? Thanks :(
EDIT: Just ran into another, similar problem
I read time out as, for example, 08:00:00 I want to split this into parts aswell. For example
08:00:00 => var a = 8, var b = 00 // ignore seconds
09:30:00 => var a = 9, var b = 30
23:45:00 => var a = 23, var b = 45
10:30:00 => var a = 10, var b = 30
:( Thanks!
strtotime()and thendate()to format it back? Edit: see bazmegakapa's answer