I want to format this date: 23/05/2013.
23/05/2013
First I want to split the string at the first / and have the res
/
You should use html():
SEE DEMO
$(document).ready(function(){ $("#date").html(''+$("#date").text().substring(0, 2) + ''+$("#date").text().substring(3)); });