Fetching Double Value from SQLite in iOS -
though may seems simple, trying hours on this.
hello, everyone, storing double value in sqlite database in ipad application.
i fetching records using simple "select * tablename" query.
then converting patient_dos value double.
but prints when display content of first patient dictionary.
"patient_dos" = "1461561219160.408936";
and below value after converting value in double variable using following conversion method.
double p_dos = [[dict objectforkey:@"patient_dos"] doublevalue];
result
printing description of p_dos: (double) p_dos = 1461561767624.27
my main concern match double, timestamp, of day when patient admitted without hh:mm:ss information.
you can convert string (which database) double like,
nsstring *str = @"1461561219160.408936"; double fl = [str doublevalue]; nslog(@"double vvalue : %f",fl);
this printing exact 1461561219160.408936
in console
Comments
Post a Comment