How to format a date value in TD tag
I am populating a Table data using Ajax calls. It has one column with Date field which is fetched from database as "YYYY-mm-dd" I want to show it as "dd/mm/yyyy".
TD value is
- <TD class='tabledob'>1981-03-12</TD>
I have tried following to format it but didn't work
- $('.tabledob').datepicker({ dateFormat: 'dd/mm/yy' });
- OR
- $(".tabledob").dateFormat('dd/mm/yy');