Posted By

steve918 on 02/04/09


Tagged

iphone pdxiphone


Versions (?)

Who likes this?

23 people have marked this snippet as a favorite

hERB
jealousy
cgrainger
DASKAjA
mattnews
umang_nine
iswear_wxp
trawor
davidsi
ztpala
vmonje
hschaaps
jodm
levysoft
bornykd
sam_symons
bobbym245
synced
epaga
wpellis
lufihal
AndreyZarembo
cnathan


Date Formatting on iPhone and Cocoa


 / Published in: Objective C
 

iPhone uses LDML standard for date formatting

  1. //Format Date
  2. NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init];
  3. [dateFormat setDateFormat: @"yyyy-MM-dd HH:mm:ss zzz"]; // 2009-02-01 19:50:41 PST
  4. NSString *dateString = [dateFormat stringFromDate: [scoreData objectForKey: @"date"]];

Report this snippet  

You need to login to post a comment.