Google BigQuery v2 API - Class BigQueryDateTimeExtensions (3.4.0)

public static class BigQueryDateTimeExtensions

Reference documentation and code samples for the Google BigQuery v2 API class BigQueryDateTimeExtensions.

Extension methods for System.DateTime and System.DateTimeOffset for use with BigQuery.

Inheritance

object > BigQueryDateTimeExtensions

Namespace

Google.Cloud.BigQuery.V2

Assembly

Google.Cloud.BigQuery.V2.dll

Methods

AsBigQueryDate(DateTime)

public static string AsBigQueryDate(this DateTime value)

Returns the given date and time formatted as BigQuery expects date values to be formatted.

Parameter
NameDescription
valueDateTime

The date/time value to extract the date from.

Returns
TypeDescription
string

The date in yyyy-MM-dd format.

AsBigQueryDate(DateTimeOffset)

public static string AsBigQueryDate(this DateTimeOffset value)

Returns the given date and time formatted as BigQuery expects date values to be formatted. The "local" value of the DateTimeOffset is used; it is not converted to UTC.

Parameter
NameDescription
valueDateTimeOffset

The date/time offset value to extract the date from.

Returns
TypeDescription
string

The date in yyyy-MM-dd format.