From: Mike Stok Date: 2009-11-19T12:20:39+09:00 Subject: Re: getting a timestamp On Nov 18, 2009, at 10:10 PM, jp wrote: > Hi, > > I would like to get a timestamp from a Date object. What is the best > aproach for this? > > thank you I'm not sure if this is the most effective, but d = Date.new(2009, 11, 18) ts = d.strftime('%s').to_i seems to work for me, giving the timestamp for 2009-11-10 00:00:00 GMT Hope this helps, Mike -- Mike Stok http://www.stok.ca/~mike/ The "`Stok' disclaimers" apply.