public static class BigQueryDateTimeExtensions
Extension methods for System.DateTime
and System.DateTimeOffset
for use with BigQuery.
Namespace
Google.Cloud.BigQuery.V2Assembly
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 | |
---|---|
Name | Description |
value | DateTime The date/time value to extract the date from. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
value | DateTimeOffset The date/time offset value to extract the date from. |
Returns | |
---|---|
Type | Description |
String | The date in yyyy-MM-dd format. |