how to set the in setdateformat in datepicker coding not use in xib..... Im using DatePicker in Format @"yyyy-MM-dd-HH-mm-ss"
<p>The output comes, for example: 17-10-1990 18:30:00 +0000. When we retrieve the value in NSDateFormatter the day is changed to 16-10-1990. No error comes.</p>

<pre><code>NSDateFormatter *sdayFormat = [[NSDateFormatter alloc] init];
[sdayFormat setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
NSString *sdayString = [sdayFormat stringFromDate:datePicker.date];
</code></pre>

<p>please help me. I'm new in iphone developer.</p>
