-1

guys how to slpit a date string ie....30/jully/2001

i want the following output
30
jully 2001


please help...

6
Contributors
6
Replies
8
Views
6 Years
Discussion Span
Last Post by sharathg.satya
0

guys how to slpit a date string ie....30/jully/2001

  1. Read the date into a char array (from the user or a file or wherever).
  2. A date can have a simple and strict format, so you can specify a few acceptable ones and compare the input to those.
  3. Go through the array one character at a time and copy the respective parts to new arrays for the day, month and year.
  4. Done. output the result.

Have a go at doing something like that and then see how you get on. If you have further problems, then post the code that you've written and explain what errors you have in a bit more detail.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.