how to convert date number to string in javascripty code example Example: convert date to string javascript var d = new Date(); var n = d.toDateString();