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.
[[["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-08-28 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eBigQueryDateTimeExtensions\u003c/code\u003e class provides extension methods for \u003ccode\u003eSystem.DateTime\u003c/code\u003e and \u003ccode\u003eSystem.DateTimeOffset\u003c/code\u003e to facilitate their use with Google BigQuery.\u003c/p\u003e\n"],["\u003cp\u003eThe class includes methods like \u003ccode\u003eAsBigQueryDate\u003c/code\u003e, which formats \u003ccode\u003eDateTime\u003c/code\u003e and \u003ccode\u003eDateTimeOffset\u003c/code\u003e values into the \u003ccode\u003eyyyy-MM-dd\u003c/code\u003e string format expected by BigQuery.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eAsBigQueryDate\u003c/code\u003e method for \u003ccode\u003eDateTimeOffset\u003c/code\u003e uses the local value and does not convert it to UTC.\u003c/p\u003e\n"],["\u003cp\u003eThe most recent version available is 3.11.0 of the \u003ccode\u003eBigQueryDateTimeExtensions\u003c/code\u003e class, and there is a list of previous versions ranging back to version 2.2.0 that are available to use.\u003c/p\u003e\n"]]],[],null,["# Google BigQuery v2 API - Class BigQueryDateTimeExtensions (3.11.0)\n\nVersion latestkeyboard_arrow_down\n\n- [3.11.0 (latest)](/dotnet/docs/reference/Google.Cloud.BigQuery.V2/latest/Google.Cloud.BigQuery.V2.BigQueryDateTimeExtensions)\n- [3.10.0](/dotnet/docs/reference/Google.Cloud.BigQuery.V2/3.10.0/Google.Cloud.BigQuery.V2.BigQueryDateTimeExtensions)\n- [3.9.0](/dotnet/docs/reference/Google.Cloud.BigQuery.V2/3.9.0/Google.Cloud.BigQuery.V2.BigQueryDateTimeExtensions)\n- [3.8.0](/dotnet/docs/reference/Google.Cloud.BigQuery.V2/3.8.0/Google.Cloud.BigQuery.V2.BigQueryDateTimeExtensions)\n- [3.7.0](/dotnet/docs/reference/Google.Cloud.BigQuery.V2/3.7.0/Google.Cloud.BigQuery.V2.BigQueryDateTimeExtensions)\n- [3.6.0](/dotnet/docs/reference/Google.Cloud.BigQuery.V2/3.6.0/Google.Cloud.BigQuery.V2.BigQueryDateTimeExtensions)\n- [3.5.0](/dotnet/docs/reference/Google.Cloud.BigQuery.V2/3.5.0/Google.Cloud.BigQuery.V2.BigQueryDateTimeExtensions)\n- [3.4.0](/dotnet/docs/reference/Google.Cloud.BigQuery.V2/3.4.0/Google.Cloud.BigQuery.V2.BigQueryDateTimeExtensions)\n- [3.3.0](/dotnet/docs/reference/Google.Cloud.BigQuery.V2/3.3.0/Google.Cloud.BigQuery.V2.BigQueryDateTimeExtensions)\n- [3.2.0](/dotnet/docs/reference/Google.Cloud.BigQuery.V2/3.2.0/Google.Cloud.BigQuery.V2.BigQueryDateTimeExtensions)\n- [3.1.0](/dotnet/docs/reference/Google.Cloud.BigQuery.V2/3.1.0/Google.Cloud.BigQuery.V2.BigQueryDateTimeExtensions)\n- [3.0.0](/dotnet/docs/reference/Google.Cloud.BigQuery.V2/3.0.0/Google.Cloud.BigQuery.V2.BigQueryDateTimeExtensions)\n- [2.4.0](/dotnet/docs/reference/Google.Cloud.BigQuery.V2/2.4.0/Google.Cloud.BigQuery.V2.BigQueryDateTimeExtensions)\n- [2.3.0](/dotnet/docs/reference/Google.Cloud.BigQuery.V2/2.3.0/Google.Cloud.BigQuery.V2.BigQueryDateTimeExtensions)\n- [2.2.0](/dotnet/docs/reference/Google.Cloud.BigQuery.V2/2.2.0/Google.Cloud.BigQuery.V2.BigQueryDateTimeExtensions) \n\n public static class BigQueryDateTimeExtensions\n\nReference documentation and code samples for the Google BigQuery v2 API class BigQueryDateTimeExtensions.\n\nExtension methods for `System.DateTime` and `System.DateTimeOffset` for use with BigQuery. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e BigQueryDateTimeExtensions \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.BigQuery.V2](/dotnet/docs/reference/Google.Cloud.BigQuery.V2/latest/Google.Cloud.BigQuery.V2)\n\nAssembly\n--------\n\nGoogle.Cloud.BigQuery.V2.dll\n\nMethods\n-------\n\n### AsBigQueryDate(DateTime)\n\n public static string AsBigQueryDate(this DateTime value)\n\nReturns the given date and time formatted as BigQuery expects date values to be formatted.\n\n### AsBigQueryDate(DateTimeOffset)\n\n public static string AsBigQueryDate(this DateTimeOffset value)\n\nReturns the given date and time formatted as BigQuery expects date values to be formatted.\nThe \"local\" value of the `DateTimeOffset` is used; it is not converted to UTC."]]