http://www.perlmonks.org?node_id=189993


in reply to Shorter Formating?

well, i'm only being half-serious here :0)
if you're using Oracle as a back-end :
select to_char(sysdate,'YYYY-MM-DD HH:MI:SS') from dual;
if you're using SQL Server , then it's even shorter :
select getdate()
can't get shorter than that, can u ? ;-)
(I wouldnt recommend firing an sql query just to get the timestamp, though)