postgresqlの日付指定方法決定版
●日付直入力指定
where {target_date} >= CAST('2010-01-01 00:00:00' AS TIMESTAMP)
●日付データを丸める
select date_trunc('day',{target_date});
とか
●当日
current_timestamp
now() でもOK
select current_timestamp;
select now();
●日付直入力指定
where {target_date} >= CAST('2010-01-01 00:00:00' AS TIMESTAMP)
●日付データを丸める
select date_trunc('day',{target_date});
とか
●当日
current_timestamp
now() でもOK
select current_timestamp;
select now();
コメント