"Sam Carleton" <scarle...@miltonstreet.com> wrote in message news:8d38ca0a0905241955j2f5f8062l43e68c8f9e48f...@mail.gmail.com > I am using julianday('now') to set the insertedon date to my tables. > The value needs to be returned to the client via Web Service so that > the client and return it later to get the next inserted record. I am > currently returning it as a double, somewhere along the way it is > getting trunkated: > > From 2454976.5929914005 to 2454976.592991
Are you using sprintf("%f"), by any chance? Default precision is 6 fractional digits. Note that a double can accurately represent 15 decimal digits, so you are not losing all that much. But you do need 8 fractional digits if you want millisecond accuracy. > How best to solve this issue? I am thinking it is best to convert to > a string format for transport via Web Service and convert back to the > native format for the next select. My option problem is I cannot make > heads or tails of how to convert the double into > YYYY-MM-DDTHH:MM:SS.SSS and back. select strftime('%Y-%m-%dT%H:%M:%f', 2454976.5929914005) 2009-05-25T02:13:54.457 select julianday('2009-05-25T02:13:54.457') 2454976.5929914 Igor Tandetnik _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users