File tree Expand file tree Collapse file tree
google-cloud-examples/src/main/java/com/google/cloud/examples/bigquery/snippets Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -950,15 +950,13 @@ public void runQueryWithTimestampParameters() throws InterruptedException {
950950 // Print the results.
951951 DateTimeFormatter formatter = ISODateTimeFormat .dateTimeNoMillis ().withZoneUTC ();
952952 for (FieldValueList row : bigquery .query (queryConfig ).iterateAll ()) {
953- for (FieldValue val : row ) {
954- System .out .printf (
955- "%s\n " ,
956- formatter .print (
957- new DateTime (
958- // Timestamp values are returned in microseconds since 1970-01-01T00:00:00 UTC,
959- // but org.joda.time.DateTime constructor accepts times in milliseconds.
960- row .get (0 ).getTimestampValue () / 1000 , DateTimeZone .UTC )));
961- }
953+ System .out .printf (
954+ "%s\n " ,
955+ formatter .print (
956+ new DateTime (
957+ // Timestamp values are returned in microseconds since 1970-01-01T00:00:00 UTC,
958+ // but org.joda.time.DateTime constructor accepts times in milliseconds.
959+ row .get (0 ).getTimestampValue () / 1000 , DateTimeZone .UTC )));
962960 System .out .printf ("\n " );
963961 }
964962 // [END bigquery_query_params_timestamps]
You can’t perform that action at this time.
0 commit comments