NSDateFormatter “Month” in 3 letters instead of full word

后端 未结 7 1353
一生所求
一生所求 2021-02-01 03:00
    NSDateFormatter* formatter = [[NSDateFormatter alloc] init];
    [formatter setDateFormat:@\"dd-MM-YYYY HH:mm\"];        
    [formatter setTimeZone:[NSTimeZone syst         


        
7条回答
  •  说谎
    说谎 (楼主)
    2021-02-01 03:20

    Have you tried: [formatter setDateFormat:@"dd-MMM-YYYY HH:mm"]; and then [formatter stringFromDate:someNSDate];

提交回复
热议问题