Reference documentation and code samples for the google-cloud-bigquery class Google::Cloud::Bigquery::Time.
Time
A TIME data type represents a time, independent of a specific date.
Inherits
Struct
Examples
require"google/cloud/bigquery"bigquery=Google::Cloud::Bigquery.newfourpm=Google::Cloud::Bigquery::Time.new"16:00:00"data=bigquery.query"SELECT name "\"FROM `my_project.my_dataset.my_table`"\"WHERE time_of_date = @time",params:{time:fourpm}# Iterate over the first page of resultsdata.eachdo|row|putsrow[:name]end# Retrieve the next page of resultsdata=data.nextifdata.next?
Create Time with fractional seconds:
require"google/cloud/bigquery"bigquery=Google::Cloud::Bigquery.newprecise_time=Google::Cloud::Bigquery::Time.new"16:35:15.376541"data=bigquery.query"SELECT name "\"FROM `my_project.my_dataset.my_table`"\"WHERE time_of_date >= @time",params:{time:precise_time}# Iterate over the first page of resultsdata.eachdo|row|putsrow[:name]end# Retrieve the next page of resultsdata=data.nextifdata.next?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["Version 1.38.1keyboard_arrow_down\n\n- [1.57.0 (latest)](/ruby/docs/reference/google-cloud-bigquery/latest/Google-Cloud-Bigquery-Time)\n- [1.56.0](/ruby/docs/reference/google-cloud-bigquery/1.56.0/Google-Cloud-Bigquery-Time)\n- [1.55.0](/ruby/docs/reference/google-cloud-bigquery/1.55.0/Google-Cloud-Bigquery-Time)\n- [1.54.0](/ruby/docs/reference/google-cloud-bigquery/1.54.0/Google-Cloud-Bigquery-Time)\n- [1.53.0](/ruby/docs/reference/google-cloud-bigquery/1.53.0/Google-Cloud-Bigquery-Time)\n- [1.52.1](/ruby/docs/reference/google-cloud-bigquery/1.52.1/Google-Cloud-Bigquery-Time)\n- [1.51.1](/ruby/docs/reference/google-cloud-bigquery/1.51.1/Google-Cloud-Bigquery-Time)\n- [1.50.0](/ruby/docs/reference/google-cloud-bigquery/1.50.0/Google-Cloud-Bigquery-Time)\n- [1.49.1](/ruby/docs/reference/google-cloud-bigquery/1.49.1/Google-Cloud-Bigquery-Time)\n- [1.48.1](/ruby/docs/reference/google-cloud-bigquery/1.48.1/Google-Cloud-Bigquery-Time)\n- [1.47.0](/ruby/docs/reference/google-cloud-bigquery/1.47.0/Google-Cloud-Bigquery-Time)\n- [1.46.1](/ruby/docs/reference/google-cloud-bigquery/1.46.1/Google-Cloud-Bigquery-Time)\n- [1.45.0](/ruby/docs/reference/google-cloud-bigquery/1.45.0/Google-Cloud-Bigquery-Time)\n- [1.44.2](/ruby/docs/reference/google-cloud-bigquery/1.44.2/Google-Cloud-Bigquery-Time)\n- [1.43.1](/ruby/docs/reference/google-cloud-bigquery/1.43.1/Google-Cloud-Bigquery-Time)\n- [1.42.0](/ruby/docs/reference/google-cloud-bigquery/1.42.0/Google-Cloud-Bigquery-Time)\n- [1.41.0](/ruby/docs/reference/google-cloud-bigquery/1.41.0/Google-Cloud-Bigquery-Time)\n- [1.40.0](/ruby/docs/reference/google-cloud-bigquery/1.40.0/Google-Cloud-Bigquery-Time)\n- [1.39.0](/ruby/docs/reference/google-cloud-bigquery/1.39.0/Google-Cloud-Bigquery-Time)\n- [1.38.1](/ruby/docs/reference/google-cloud-bigquery/1.38.1/Google-Cloud-Bigquery-Time) \nReference documentation and code samples for the google-cloud-bigquery class Google::Cloud::Bigquery::Time.\n\nTime\n\nA TIME data type represents a time, independent of a specific date. \n\nInherits\n\n- Struct\n\nExamples \n\n```ruby\nrequire \"google/cloud/bigquery\"\n\nbigquery = Google::Cloud::Bigquery.new\n\nfourpm = Google::Cloud::Bigquery::Time.new \"16:00:00\"\ndata = bigquery.query \"SELECT name \" \\\n \"FROM `my_project.my_dataset.my_table`\" \\\n \"WHERE time_of_date = @time\",\n params: { time: fourpm }\n\n# Iterate over the first page of results\ndata.each do |row|\n puts row[:name]\nend\n# Retrieve the next page of results\ndata = data.next if data.next?\n```\n\nCreate Time with fractional seconds: \n\n```ruby\nrequire \"google/cloud/bigquery\"\n\nbigquery = Google::Cloud::Bigquery.new\n\nprecise_time = Google::Cloud::Bigquery::Time.new \"16:35:15.376541\"\ndata = bigquery.query \"SELECT name \" \\\n \"FROM `my_project.my_dataset.my_table`\" \\\n \"WHERE time_of_date \u003e= @time\",\n params: { time: precise_time }\n\n# Iterate over the first page of results\ndata.each do |row|\n puts row[:name]\nend\n# Retrieve the next page of results\ndata = data.next if data.next?\n```\n\nMethods\n\n#value= \n\n def value=(value) -\u003e String\n\nThe BigQuery TIME. \n**Parameter**\n\n- **value** (String) --- the newly set value \n**Returns**\n\n- (String) --- the newly set value"]]