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.

sqlite database image field containing double values

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.

update: added data type image.

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

Popular posts from this blog

javascript - How to get current YouTube IDs via iMacros? -

c# - Maintaining a program folder in program files out of date? -

emulation - Android map show my location didn't work -