how to get today date in YYYYMMDD in firebird, I had a look on following but could not figured how to write this.
IN FIREBIRD v2.5.5:
SELECT LPAD( EXTRACT( YEAR FROM CURRENT_TIMESTAMP ), 4, '0' ) ||
LPAD( EXTRACT( MONTH FROM CURRENT_TIMESTAMP ), 2, '0' ) ||
LPAD( EXTRACT( DAY FROM CURRENT_TIMESTAMP ), 2, '0' ) || ' ' ||
LPAD( EXTRACT( HOUR FROM CURRENT_TIMESTAMP ), 2, '0' ) ||
LPAD( EXTRACT( MINUTE FROM CURRENT_TIMESTAMP ), 2, '0' ) ||
LPAD( TRUNC( EXTRACT( SECOND FROM CURRENT_TIMESTAMP ) ), 2, '0' )
FROM rdb$database
OUTPUT IS: YYYYMMDD HHMMSS