How can i change the date formatting by using jqury

myStr should have encoded text with the proper escape sequences and no spacing.
myStr should have one newline character \n
myStr should have one carriage return character \r
myStr should have two correctly escaped backslash characters \

Dear sir
I got the work of it and its my first post that why it not proper

thanks