Problem date not return in right format..

when i’m using “scheduler.getEvent(event_id).start_date;”, why it doesn’t return date in number format…as example what i want is return in “16-05-2013 12:00” not in format “Thu May 16 2013 12:00:00”…how to achieve that?? sorry for simple question…

It returns date as date object ( which is more usefull in most cases )
You can use date object API to get info, or scheduler date API
docs.dhtmlx.com/scheduler/date_formats.html

var format = scheduler.date.date_to_str("%d/%m/%Y"); var date = format( scheduler.getEvent().start_date );

thank you for your fast replies…

i try modified your code like this “var format = scheduler.date.date_to_str(”%Y-%m-%d %H:%i %A");"
which is return back the date like this “2013-10-24 12:42 AM”… in database i’m using datetime data type, but can’t store this date value because having “AM” in last value…if i remove the “AM”, it can be save into database else it will be zero for all value… is it i need to change table field data type into varchar or something else?? i’m using mysql database…

If you are using mysql - you can use datetime field type.
The valid format will be “%Y-%m-%d %H:%i:%s”