nsstring - Trying to do some simple calculations in iOS project? -



nsstring - Trying to do some simple calculations in iOS project? -

i want know how simple equations in ios app, if point me in right direction wonderful!

i need know how convert nsnumber represents minutes nsstring represents hours , minutes (example: 100 = 1 hr , 40 minutes)

i want know if possible convert 2013-02-08t10:50:00.000 10:50am

thanks tips guys might have.

for conversion :

nsnumber *yournumber = [nsnumber numberwithint100]; nsinteger hr = [yournumber intvalue] / 60; nsinteger minutes = [yournumber intvalue] % 60; nsstring *time_stamp = [nsstring stringwithformat:@"%d hr , %d minutes",hour,minutes];

as comments suggested can utilize nsdateformatter format nsdate.

ios nsstring calculator nsnumber

Comments

Popular posts from this blog

javascript - mongodb won't find my schema method in nested container -

How do you set up a perforce server to work over the internet? -

ios - Lagging ScrollView with UIWebview inside -