On Mon, Nov 2, 2009 at 2:12 PM, Dale E. Moore <[email protected]> wrote: > Hi All; > > I want to enter my trip times.
Enter where? You have been asking this question for a while now, but something tells me that you are not asking the complete question. Where do you want to enter the trip times? How do you want to enter them? > I would like to enter something like 5:6:7.89 > for 5 hours, 6 minutes, 7 seconds and 89 hundredths. If you have an application, you could split the 5:6:7.89 string into its h, m, s and s/100 components, and then enter them as separate integers into separate columns in sqlite. > Some time later I would > like to sum all these times and have it represented as > years-months-days.hours:minutes:seconds.hundredths. > Once you have your separate cols as described above, rest is just a matter of math and formatting. Otherwise, you could convert your entry, once you have split it into component time fractions, of course, into seconds. And then do the math. You can use the various datetime functions provided by sqlite, but note that they expect dates (timestamps), not durations. You could also enter start and end of your trips, and then calc the durations from those. Why don't you ask the complete question, describing what you are creating, how, using what software, etc., and then you will get a better answer. > How would you approach this problem with sqlite? > > I have mocked up something that enters like 5:6:7.89 then converts that to > seconds as a Double data type. Now I'm having problems getting the proper > formatting out. > > I would be happy to have any ideas you care to share, > Dale E. Moore > _______________________________________________ > sqlite-users mailing list > [email protected] > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > -- Puneet Kishor http://www.punkish.org Carbon Model http://carbonmodel.org Charter Member, Open Source Geospatial Foundation http://www.osgeo.org Science Commons Fellow, http://sciencecommons.org/about/whoweare/kishor Nelson Institute, UW-Madison http://www.nelson.wisc.edu ----------------------------------------------------------------------- Assertions are politics; backing up assertions with evidence is science ======================================================================= Sent from Madison, WI, United States _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

