public static void sqltimestampdiff ( StringBuilder buf , List < ? extends CharSequence > parsedArgs ) throws SQLException { if ( parsedArgs . size ( ) != 3 ) { throw new PSQLException ( GT . tr ( "{0} function takes three and only three arguments." , "timestampdiff" ) , PSQLState . SYNTAX_ERROR ) ; } buf . append ( "extract( " ) . append ( constantToDatePart ( buf , parsedArgs . get ( 0 ) . toString ( ) ) ) . append ( " from (" ) . append ( parsedArgs . get ( 2 ) ) . append ( "-" ) . append ( parsedArgs . get ( 1 ) ) . append ( "))" ) ; }
time stamp diff