开发者

How to print the date in iphone?

开发者 https://www.devze.com 2022-12-20 22:34 出处:网络
I am new to iphone development.I am having array of date .I want to print the date in my console.But I didn\'t want to convert it into a string and print it.I want to print as a date.How can 开发者_开

I am new to iphone development.I am having array of date .I want to print the date in my console.But I didn't want to convert it into a string and print it.I want to print as a date.How can 开发者_开发百科i achieve that.Please help me out thanks.


NSLog(@"%@", [NSDate date]);

The %@ specifier can accept any ObjC objects. It will call -description to convert it into a string automatically when printing.

0

精彩评论

暂无评论...
验证码 换一张
取 消