Ads API .NET library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Google.Api.Ads.AdManager.Util.v202305.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.v202305.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.
static AdManagerDateTime Google.Api.Ads.AdManager.Util.v202305.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.v202305.DateTimeUtilities.ToString ( AdManagerDateTime  dateTime,
string  patternText 
)
inlinestatic

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

static string Google.Api.Ads.AdManager.Util.v202305.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: