Your own NSDateFormatter


/ Published in: Objective C

Create your own NSDateFormatter


Copy this code and paste it in your HTML
  1. NSDate *today = [[NSDate alloc] init];
  2. NSDateFormatter *forIdPeriodFormatterStyle = [[NSDateFormatter alloc] init];[forIdPeriodFormatterStyle setDateFormat:@"yyyyMMdd"];//you can add HH and mm
  3. NSString *idPeriodString = [forIdPeriodFormatterStyle stringFromDate:today];

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.