1

I'm sure this is a easy problem, but I just can not seem to find how to do this anywhere. I need to use the current Date and save it into a String. I do not know how to get the dat stamp. Could someone please help me out? Thank you for your time! -Jeff

Jeff
  • 159
  • 1
  • 4
  • 13

2 Answers2

4

You will need to set your format according to the docs

NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
[formatter setDateFormat:@"MM-dd-yy"];
NSString *date = [formatter stringFromDate:[NSDate date]];
coneybeare
  • 33,113
  • 21
  • 131
  • 183
0

Use NSDateFormatter, heres a link with examples

coneybeare
  • 33,113
  • 21
  • 131
  • 183
Daniel
  • 22,363
  • 9
  • 64
  • 71