Class BigQueryDateTimeExtensions (3.0.0)

public static 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.