I have a date in this format:
"2015/05/25"
How to format it like this:
"2015-05-25"
I have a date in this format:
"2015/05/25"
How to format it like this:
"2015-05-25"
You can use built-in replace method for completing this task.
dateStr = "2015/05/25"
dateStr = dateStr.replace("/","-")
print(dateStr)
For more information about the replace function, you can read https://www.geeksforgeeks.org/python-string-replace/
datetime module if you plan to actually use these dates