iOS获取当前时间日期

-(void)displaysDheCurrentDate

{

   NSDate * senddate=[NSDatedate];

    NSDateFormatter *dateformatter=[[NSDateFormatteralloc] init];

    [dateformattersetDateFormat:@"dd/MM/yyyy"];

   NSString * locationString=[dateformatter stringFromDate:senddate];

   NSLog(@"locationString:%@",locationString);

}

你可能感兴趣的:(ios,iOS获取当前时间日期)