Derby interprets the JDBC escape syntax for timestamp as equivalent to the correct SQL syntax for timestamps. Derby also supports the ISO format of 23 characters (17 digits, 3 dashes, and 3 decimal points).
{ ts 'yyyy-mm-dd hh:mm:ss.f...' }
TIMESTAMP('yyyy-mm-dd hh:mm:ss.f...')
The fractional portion of timestamp constants (.f...) can be omitted.