javascript - What's the most efficient way to combine dates? -


records in database this:

from: 2012-01-16 06:20:00   to: 2012-01-16 06:30:00 from: 2012-01-16 06:30:00   to: 2012-01-16 06:40:00 from: 2012-01-16 06:40:00   to: 2012-01-16 06:50:00 

and inside application have combine them 1 record looking this:

from: 2012-01-16 06:20:00   to: 2012-01-16 06:50:00 

sometimes records not in order. might that:

from: 2012-01-16 06:20:00   to: 2012-01-16 06:30:00 from: 2012-01-16 06:40:00   to: 2012-01-16 06:50:00 from: 2012-01-16 06:30:00   to: 2012-01-16 06:40:00 

if timestamp may use min(from) , max(to).


Comments

Popular posts from this blog

service - Android MediaPlayer calls onCompletion before it already finished -

javascript - Training Neural Network to play flappy bird with genetic algorithm - Why can't it learn? -

javascript - Create a stacked percentage column -