LoginSignup
0
0

More than 5 years have passed since last update.

NSDateまわりのメモ

Posted at

//今日の日付取得
NSDate *today = [NSDate date];

//日付を画面に表示する時のフォーマット作成
NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init];
[dateFormat setDateFormat:@"yyyy/MM/dd HH:flag_mm:ss"];

//NSDateをNSStringに変換するまでの処理
NSDate *date = [NSDate date];
NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
[formatter setDateFormat:@"yyyy/MM/dd HH:flag_mm:ss"];
NSString *dateStr = [formatter stringFromDate:date];

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0