20140309

任意の日付、日時から一定間隔でタイムスタンプを出力するSQL

-- postgres 9.x

-- 5minuits interval table sample

SELECT

    timestamp '2014/01/01 00:00' + cast( i || 'minutes' as interval)

from

    generate_series(0,1440,5)s(i)

;

0 件のコメント: