Ads API .NET library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Google.Api.Ads.AdManager.Util.v202202.DateTimeUtilities Class Reference

A utility class that allows you to build Datetime objects from strings. More...

Static Public Member Functions

static AdManagerDateTime FromString (string dateString, string timeZoneId)
 Converts the string in format yyyyMMdd HH:mm:ss to a DateTime object with the specified time zone. More...
 
static AdManagerDateTime FromDateTime (System.DateTime dateTime, string timeZoneId)
 Converts a System.DateTime object to a AdManager DateTime object with the specified timeZoneId. Does not perform time zone conversion. This means the returned DateTime value may not represent the same instant as the System.DateTime value. More...
 
static string ToString (AdManagerDateTime dateTime, string patternText)
 Formats the value of the DFP date time using the specified NodaTime compatibleformat. More...
 
static string ToString (AdManagerDateTime dateTime, string patternText, IFormatProvider formatProvider)
 Formats the value of the DFP date time using the specified NodaTime compatibleformat. More...
 

Detailed Description

A utility class that allows you to build Datetime objects from strings.

Member Function Documentation

static AdManagerDateTime Google.Api.Ads.AdManager.Util.v202202.DateTimeUtilities.FromDateTime ( System.DateTime  dateTime,
string  timeZoneId 
)
inlinestatic

Converts a System.DateTime object to a AdManager DateTime object with the specified timeZoneId. Does not perform time zone conversion. This means the returned DateTime value may not represent the same instant as the System.DateTime value.

Parameters
dateTimeThe DateTime object.
timeZoneIdThe timeZoneId to use.
Returns
A AdManager Datetime object.

Referenced by Google.Api.Ads.AdManager.Examples.CSharp.v202202.GetAvailabilityForecast.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202202.GetTrafficData.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202202.GetMcmEarnings.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202202.GetRecentlyUpdatedLineItems.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202202.GetOrdersStartingSoon.Run(), and Google.Api.Ads.AdManager.Examples.CSharp.v202202.GetRecentlyModifiedContent.Run().

static AdManagerDateTime Google.Api.Ads.AdManager.Util.v202202.DateTimeUtilities.FromString ( string  dateString,
string  timeZoneId 
)
inlinestatic

Converts the string in format yyyyMMdd HH:mm:ss to a DateTime object with the specified time zone.

Parameters
dateStringThe date string.
timeZoneIdThe timeZoneId to set.
Returns
A AdManager Datetime object.
static string Google.Api.Ads.AdManager.Util.v202202.DateTimeUtilities.ToString ( AdManagerDateTime  dateTime,
string  patternText 
)
inlinestatic

Formats the value of the DFP date time using the specified NodaTime compatibleformat.

Referenced by Google.Api.Ads.AdManager.Examples.CSharp.v202202.GetAvailabilityForecast.Run().

static string Google.Api.Ads.AdManager.Util.v202202.DateTimeUtilities.ToString ( AdManagerDateTime  dateTime,
string  patternText,
IFormatProvider  formatProvider 
)
inlinestatic

Formats the value of the DFP date time using the specified NodaTime compatibleformat.


The documentation for this class was generated from the following file: