3 Mar 2017

How to Get Date from a double value...



How to Get Date from a double value...


getDateFrom:(double)value
{
    NSTimeInterval seconds = value;
    NSInteger numberOfDigits = [self numberOfDigitsIn:value];
    if (numberOfDigits > 10)
    {
        seconds = value / 1000;
    }
    NSDate *date = [NSDate dateWithTimeIntervalSince1970:seconds];
    NSLog(@"Date is %@" date);  
}

No comments:

Post a Comment

Recent Posts

Codable demo

Link: https://www.dropbox.com/s/kw7c1kgv1628bh7/codableDemo.zip?dl=0