Converting nsdates to NSStrings and vice-versa

hi, as part of an app I'm writing(my first) I need to constantly convert NSDates to NSStrings and vice-versa. So I thought I would write the 2 functions but include them as methods with the main controller and call them with something like


[self convertToDate:stringToConvert]


However , I'm experiencing problems and getting warnings all over the place - may be because I'm calling them from within 'proper' methods in the class. The functions themselves are pretty straight forward and I've copied them from forums like this one


I realise this is probably not best practice , but how else would I do it? Would I create a separate .h and .m files.


Any thoughts would be gratefully received. I have posted threads about mixing normal functions and methods on this forum and I am grateful for all your feedback , and this relates to this matter , but I'm starting to wonder if my approach is wrong?

MacBook Air (13-INCH, MID 2011)

Posted on Jun 8, 2013 3:06 AM

Reply
3 replies

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Converting nsdates to NSStrings and vice-versa

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.