Hi I don’t know how to format data, I try to convert data what I’m doing it wrong
I’m using this event to add events into Db
[code]scheduler.attachEvent(“onEventAdded”, function(id){
var ev = scheduler.getEvent(id);
ev.estado=“anadir”;
var convert = scheduler.date.str_to_date("%Y-%m-%d %H:%i:%s%",true);
var convert = scheduler.date.str_to_date("%Y-%m-%d %H:%i:%s%",true);
Here you are creating only a function named convert which will convert string into the date object according to the specified format. You don’t convert anything yet.
To convert date object to the string you need to create another function and convert date itself:
var convert = scheduler.date.date_to_str("%Y/%m/%d %H:%i:%s", true);
var converted_date = convert(ev.start_date);
Now converted_date variable stores a string in the specified above format made from the ev.start_date date object.
Hope this helps.
Best regards,
Ilya
Get a guaranteed answer from DHTMLX technical support team
under the most suitable support plan