code: public void runQueryWithTimestampParameters() throws InterruptedException {
      // [START bigquery_query_params_timestamps]
      // BigQuery bigquery = BigQueryOptions.getDefaultInstance().getService();
      ZonedDateTime timestamp = LocalDateTime.of(2016, 12, 7, 8, 0, 0).atZone(ZoneOffset.UTC);
      String query = "SELECT TIMESTAMP_ADD(@ts_value, INTERVAL 1 HOUR);";
      // Note: Standard SQL is required to use query parameters.
      QueryJobConfiguration queryConfig =
          QueryJobConfiguration.newBuilder(query)
              .addNamedParameter(
                  "ts_value",
                  QueryParameterValue.timestamp(
                      // Timestamp takes microseconds since 1970-01-01T00:00:00 UTC
                      timestamp.toInstant().toEpochMilli() * 1000))
              .build();
  
      // Print the results.
      DateTimeFormatter formatter = DateTimeFormatter.ISO_INSTANT.withZone(ZoneOffset.UTC);
      for (FieldValueList row : bigquery.query(queryConfig).iterateAll()) {
        System.out.printf(
            "%s\n",
            formatter.format(
                Instant.ofEpochMilli(
                        // Timestamp values are returned in microseconds since 1970-01-01T00:00:00
                        // UTC,
                        // but org.joda.time.DateTime constructor accepts times in milliseconds.
                        row.get(0).getTimestampValue() / 1000)
                    .atOffset(ZoneOffset.UTC)));
        System.out.printf("\n");
      }
      // [END bigquery_query_params_timestamps]
    }
docs: Example of running a query with timestamp query parameters.