ITeye博客

日期格式

caoyudong · 2015-03-24 16:56 · 编程语言 · Markdown

NSDate *datepl = [NSDatedateWithTimeIntervalSince1970:strDara.intValue];

            NSDateFormatter *formatter = [[NSDateFormatter alloc] init];

            [formatter setDateStyle:NSDateFormatterMediumStyle];

            [formatter setTimeStyle:NSDateFormatterShortStyle];

            [formatter setDateFormat:@"YYYY-MM-dd"];

 

            NSString *strLabelDate = [formatter stringFromDate:datepl];

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。