Hi ,
I have a variable which stores the date in string format
example.. lets say char a='2-12-2016'
i want to convert the format to 2016/12/2
How to achieve this using C?
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
a char stores a single character, so char a='2-12-2016' isn't going to work. For your question, check into strchr.
don't forget to include string.h for strchr