2006/1/24, misiek <michaelaugustyniak / gazeta.pl>: > from FORM I can select days, FROM - TO > like from Monday to Friday > exanmple: > > from 2006-01-20 to 2006-01-24 > > and than I need to put each day to database as five days like > > 2006-01-20 > 2006-01-21 > 2006-01-22 > 2006-01-23 > 2006-01-24 > > so first I need to put each day to array and that in loop put each day > to database. > > this is what I want > thanks for help Now we're cooking. How's that? require 'date' # fetch start and end date from somewhere start=Date.today endd=start+30 d=start while d < endd puts d d += 5 end robert -- Have a look: http://www.flickr.com/photos/fussel-foto/