Reputation: 566
I'd like to convert the date separators in a date.
So, from 11.11.2009 -> 11-11-2009
Could someone help me do that with a regex?
Upvotes: 2
Views: 658
Reputation: 6417
You mean '11.11.2009'.replace(/\./g, '-').
'11.11.2009'.replace(/\./g, '-')
Upvotes: 3
Reputation: 12801
my_date = my_date.replace(/\./g, '-');
Upvotes: 8