Quote:
Originally Posted by dcjones
i all,
I have an SQL table and one of the fields holds data for time, but it is only stored as text, example 4:30.
My question is can it be converted into a DateTime format and then converted into a timestamp so I can use the timestamp to calculate times from the past and the future.
Thanks in advance.
|
- (IBAction)showActivity {
NSDateFormatter *formatter;
NSDate *date;
date = [NSDate date];
formatter = [[[NSDateFormatter alloc] init] autorelease];
[formatter setDateFormat:@"MMM dd, yyyy HH:mm"];
NSString *str=[[NSString alloc]init];
self.str = [formatter stringFromDate:date];
NSLog(str);
}
i hope my code will be help to u