2011-09-21 118 views

回答

1
 NSDateFormatter *frmtr=[[NSDateFormatter alloc]init]; 
     [frmtr setDateFormat:@"dd/MM/yyyy HH:mm:ss a"]; 
     NSDate *datefr = [frmtr dateFromString:@"7/7/2011 12:00:00 AM"]; 
     NSString *dates=[frmtr stringFromDate:[NSDate date]]; 
     NSLog(@"datefr%@",datefr); 
     NSLog(@"dates%@",dates); 
     [frmtr release]; 
相關問題