I have a database column that populates a label. It is date format so it saves entries as yy-mm-dd 00:00.0. I used this code to change it to the format that I wanted when it is listed.
var yyyymmdd = value.split(" ")[0].split("-");
return yyyymmdd[1] + "-" + yyyymmdd[2] + "-" + yyyymmdd[0];
Now I need to possibly change the color and this is the code I use to do it.
if(value.dead){
$(element).css({"color": "#E33"});
}else if(value.pairout){
$(element).css({"color": "#0c9999"});
}
return value.Date;
My question is: how can I combine both of these codes to make them work together to reorder the date and possibly change the color.