I'm Using NSOutputStream to output data from the client (IOS device) To the server (PC Device). In the following code I'm Outputting some data using outputStream and(this code is working 100% )
NSString *response = @" Today's Sunny \n ";
NSData *data = [[NSData alloc] initWithData:[response dataUsingEncoding:NSASCIIStringEncoding]];
[outputStream write:[data bytes] maxLength:[data length]];
I would like to do the same thing using Outputstream to output the current time like (09:24.00) in this format (hh:mm:ss)
Here what i have tried
NSDate *currentTime = [NSDate date];
NSDateFormatter *formatter = [[NSDateFormatter alloc]init];
[formatter setDateFormat:@"hh:mm:ss"];
//outputstream here
I would really appreciate your help in this matter