I want to know if I can create a function that can read a variable and if it's a date convert it to dd/mm/yyyy and when it's not a date it must do nothing
The date is in this format
2011-11-16T16:48:34.743
In my case i do have this code : (I have to read colomns name and if is egal then i take the value of the variable the problem is that when it take date i can format it )
if (type == "TASK") {
for (var key in ticket.task) {
if (key == result) {
Val = Val.replace(item, ticket.task[key]);
}
}
}
i have to replace a word with a value in the scope ticket.task[key] the method match doesn't work with ticket.task[key]